Hi all! Shouldn't the `config.toml` file be in the...
# ask-community
w
Hi all! Shouldn't the
config.toml
file be in the path where prefect is installed? There is only
backend.toml
file in the path where my prefect is installed, are those two the same? Also i can't read
backend.toml
. I got the error message like below:
Copy code
TomlDecodeError: Found invalid character in key name: ':'. Try quoting the key name. (line 1 column 2 char 1)
What's the backend.toml file?
1
a
backend.toml is only a config whether you use Cloud or Server
Shouldn't the
config.toml
file be in the path where prefect is installed?
it's not required - most of the configurations can be set via environment variables, but they can also alternatively be configured on config.toml if that's your preference I hope I haven't confused you even further
e.g. ~/.prefect/config.toml with:
Copy code
[server]
host = ...
port = ...
is equivalent to shell commands:
Copy code
export PREFECT__SERVER__HOST=xxx
export PREFECT__SERVER__PORT=xxx
w
Uhm.. The reason I want to find the config.toml file is to work with Adding context globally. (link)
And i can't find config.toml.. under the .prefect
a
so you shouldn't modify context but you can use it in your flows context is totally unrelated to config.toml actually could you explain what you are trying to do on a business level? what do you want to modify globally?
w
oh, anna sorry to late answer. (I don't know exactly what 'context' work for) Actually i want to use the 'context' to always have the information of database connection rather than use resource manager. The reason why don't use resource manager is resource manager can't detect the invaild connection of database. So i want to put the information of database connection to context and then the context always callable that information. If this method too poor, please tell me without reserve🤗
a
to store credentials, in Prefect 1.0 there is a concept of Secrets - you can store your DB credentials there
w
Thanks Anna, i'll see the Secrets!
108 Views