Ohads
Ohads

Reputation: 63

How to set Data cube config file?

I'm trying to work on a new project and I red about Data Cube that can really help me.

In order to use it and to try to work with it, I installed postgres as required on the official website: https://datacube-core.readthedocs.io/en/datacube-1.4.1/ops/db_setup.html

When trying to initialize the dataset with this command:

datacube -v system init

I get the error: "Error: No datacube config found"

As requested I added env var and tried to put the config file everywhere (home dir, default, current...)

config file:

[datacube]
db_database: datacube

# A blank host will use a local socket. Specify a hostname (such as localhost) to use TCP.
db_hostname:

# Credentials are optional: you might have other Postgres authentication configured.
# The default username otherwise is the current user id.
db_username: postgres 
db_password: postgres 

I'm using windows 10 with conda, python 3.8,

Do you know what I'm missing? TIA

Upvotes: 0

Views: 936

Answers (2)

Indiphile
Indiphile

Reputation: 1

Copy this file(integration.conf) and paste it to the root dir of datacube-core then rename the file to datacube.conf and edit the config file with your Postgres database(with postgis extension).

Upvotes: 0

Destiny
Destiny

Reputation: 141

As provided in documentation -

Datacube looks for a configuration file in ~/.datacube.conf or in the location specified by the DATACUBE_CONFIG_PATH environment variable.

Make sure you file name is datacube.conf and it is in the proper path

Upvotes: 0

Related Questions