Charles Lariviere
04/06/2022, 6:00 PM"resources": {
"snowflake": {
"config": {
"account": {"env": "SNOWFLAKE_ACCOUNT"},
...
}
},
However, the same thing does not seem possible for an input:
"list_objects": {
"inputs": {
"bucket": {"env": "S3_BUCKET"},
Ben Jordan
04/06/2022, 6:41 PM@job(resource_defs={...})
to make them available to the Ops, does that sound right?johann
04/07/2022, 2:13 PMCharles Lariviere
04/07/2022, 9:20 PMbucket
to a config param for now, but that prevents us from connecting that input to an upstream op if we needed to pass that programmatically in the future 🤔owen
04/07/2022, 11:23 PM"list_objects": {
"inputs": {
"bucket": os.getenv("S3_BUCKET"),
would work in this scenario (sorry for the late reply). For more context, the reason the env
solution doesn't work is that the snowflake schema is defined with a StringSource as the config type for that field (which accepts either a regular string or the env thing, and does the nice conversion). The input field can have a ton of different types and I don't think we special-case the scenario when we detect a string type as the input type from the op (I believe we default to an Any kind of type).Charles Lariviere
04/08/2022, 6:22 PMPatrice O'Carroll
05/20/2022, 6:29 PM.py
file in which my configs lives, it seems like it cannot get my env variable. It returns None. I specify the environment variable in a staging.yml
that I use for dagster-cloud deployment.
container_context:
ecs:
secrets:
section.owen
05/23/2022, 4:26 PMPatrice O'Carroll
05/24/2022, 3:50 PMowen
05/24/2022, 3:54 PMPatrice O'Carroll
05/24/2022, 3:55 PMos.getenv("ENVVAR", default="")
it allows me to deploy, sure, but then in the launchpad it still does not fetch my env variable, it uses the default empty string instead. I define my environment variable using the (new?) feature to add them in the code location following this syntax;
container_context:
ecs:
secrets:
Could that be the issue? See the ml-models
code location file here https://dribbble.dagster.cloud/staging/workspaceCharles Lariviere
05/26/2022, 2:10 PMdagster-mlflow
with passing environment variables to the mlflow resource. This PR I submitted last week would solve the need for relying on os.getenv
for now if we can get it merged to the next Dagster release 😄 https://github.com/dagster-io/dagster/pull/7997Patrice O'Carroll
05/26/2022, 2:14 PM