https://dagster.io/ logo
#ask-community
Title
# ask-community
r

Rohan Kudale

06/15/2023, 7:22 AM
Hey Guys, Is there a way to pass dbt profiles as a dict(dynamicaly) instead of directory path to "*load_assets_from_dbt_project*" api. Currently I am passing as a directory but if we can pass it as a dict, I can configure it dynamically.
Copy code
dbt_assets = load_assets_from_dbt_project(
            project_dir=settings.dbt_project_path,
            profiles_dir=settings.dbt_profiles,
            key_prefix="snowflake"
        )
Please tell if there is any other way also to avoid giving profile as a dict
o

owen

06/15/2023, 5:42 PM
hi @Rohan Kudale! is the idea here to dynamically alter your profile based on your environment or something like that? there's no way to pass in a dictionary to this function, but one thing you could consider would be to configure your profiles file with environment variables: https://docs.getdbt.com/reference/dbt-jinja-functions/env_var
👍 1