Rene Silva
01/30/2023, 12:47 PMload_assets_from_dbt_project
depend on aws secretsmanager's secrets being exposed on environment variables (which are used on dbt profiles)jamie
01/30/2023, 4:03 PMRene Silva
01/30/2023, 4:27 PMjamie
01/30/2023, 4:30 PMdef verify_credentials():
# code to check that aws credentials are valid and return True or False
all_assets = []
if verify_credentials():
all_assets.append(load_assets_from_dbt_project(...)
#add other assets to all_assets
defs = Definitions(assets=all_assets, ...)
Rene Silva
01/30/2023, 4:39 PMjamie
01/30/2023, 4:41 PMowen
01/30/2023, 5:03 PMload_assets_from_dbt_project
when it's called initially, it'd only impact things around the time that the actual dbt run
command would be invoked.
is a correct summary of your issue just that you'd like secrets from secretsmanager to be available as environment variables which are read when compiling/running the dbt project? If so, I don't think this is currently possible purely by making changes to your python code, as the environment variables set in the host process (the dagster process) are not going to be available to the dbt process that's kicked off when we're compiling/running dbt code (as we don't pass the current environment into that subprocess)
what executor/run launcher are you currently using? I think that would be a good place to start in terms of setting up the environment to have your secrets loadedRene Silva
01/30/2023, 5:05 PM