Replies: 2 comments
-
Potentially related: #3915 |
Beta Was this translation helpful? Give feedback.
-
Hi @ianwhale, thanks for opening this discussion. I found it while looking for some material on credentials myself 😄 Recently I went ahead and implemented my own BigQuery dataset with manual credential handling on But it was a burden, because essentially I had to rewrite the JSON key file given by BigQuery into a YAML file, for very little gain. Later I asked around and figured that nobody actually cared about that because exporting the And then there are more complex examples, like this one we documented on fetching credentials from Azure KeyVault using hooks https://docs.kedro.org/en/stable/hooks/common_use_cases.html#use-hooks-to-load-external-credentials #3811 did a good job at suggesting a way forward and collecting some of the issues that have been active over the years about credentials, but we haven't prioritized it. Long story short, I'm in the same page as you and I don't think our current credentials management is fit for purpose. |
Beta Was this translation helpful? Give feedback.
-
Howdy all!
I'm opening a new discussion from this thread on slack.
The larger question @noklam and I were discussing is: "How should
credentials.yml
properly interact with environment variables?"This was specifically in the context of calling LLM APIs in a Kedro pipeline. The two approaches are:
dotenv
hookUsing datasets
This is the approach used here: https://github.com/kedro-org/kedro-plugins/blob/main/kedro-datasets/kedro_datasets_experimental/langchain/_openai.py
You'd have your
credentials.yml
and then your
catalog.yml
Pros:
Cons:
Using
dotenv
(Or using
dynaconf
'sload_dot_env
).This would ignore all the bits we have to do above to set keys programmatically. Instead we'd use a hook like:
Then just leave it to our libaries (e.g. lanchain) to access environment variables.
Pros:
Cons:
credentials.yml
and.env
used bydotenv
.Wondering what the team thinks is the right way.
@noklam let me know if this gets at the question we were discussing!
Related: #3877
Beta Was this translation helpful? Give feedback.
All reactions