Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: Updated Config providers docs #1071

Merged
merged 6 commits into from
Mar 25, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 20 additions & 6 deletions docs/website/docs/general-usage/credentials/config_providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,26 @@ sections and key names are separated by "." into the provider-specific formats.
1. For TOML, names are case-sensitive and sections are separated with ".".
1. For Environment Variables, all names are capitalized and sections are separated with double
underscore "__".

Example: When `dlt` evaluates the request `dlt.secrets["my_section.gcp_credentials"]` it must find
the `private_key` for Google credentials. It will look

1. first in env variable `MY_SECTION__GCP_CREDENTIALS__PRIVATE_KEY` and if not found,
1. in `secrets.toml` with key `my_section.gcp_credentials.private_key`.

Example: To override a token in "secrets.toml":

```toml
[sources.github]
access_token = "GITHUB_API_TOKEN"
```
Use the following environment variable:
```bash
export SOURCES__GITHUB__ACCESS_TOKEN="your_token_here"
```


1. When `dlt` evaluates a request like 'dlt.secrets["my_section.gcp_credentials"]', it looks for it as follows:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

replace this sentence with this please:
When dlt evaluates the request dlt.secrets["my_section.gcp_credentials"] it must find the private_key for Google credentials. It looks for it as follows:

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done


1. It first searches for environment variable `MY_SECTION__GCP_CREDENTIALS__PRIVATE_KEY` and if not found,
1. in `secrets.toml` file under `my_section.gcp_credentials.private_key`.

This way, `dlt` prioritizes security by using environment variables before looking into configuration files.


### Environment provider

Expand Down
Loading