https://dagster.io/ logo
#dagster-support
Title
# dagster-support
b

Bartosz Kopytek

01/11/2023, 3:15 AM
Hi, I have a question regarding DT assets which I didn't find in the docs. Assuming that I loaded my DBT assets:
Copy code
dbt_assets = load_assets_from_dbt_project(
    project_dir=DBT_PROJECT_PATH, profiles_dir=DBT_PROFILES, key_prefix=["jaffle_shop"]
)
How can I access/modify models as individual assets (to add metada, versioning, plots etc.)? mock example:
Copy code
@asset
def customers_dbt_asset(dbt_asset = customers, key_prefix=["jaffle_shop"], group_name="staging"):
    return customers
s

sandy

01/11/2023, 4:28 PM
Hey @Bartosz Kopytek - check out the parameters on
load_assets_from_dbt_project
- there are a few that let you choose a group name, record runtime metadata, etc. Let me know if there's anything missing there that you need
b

Bartosz Kopytek

01/12/2023, 8:28 AM
@sandy sounds fine, but what if I would like to set different freshness policy on different dbt models? Is that possible?
@sandy Oh I think I get it, I would need to select/exclude them, and then for example combine them in the DAG, right?
s

sandy

01/12/2023, 9:30 PM
take a look at the documentation for the
node_info_to_freshness_policy_fn
argument of the method I mentioned above. it discusses how you can set freshness policies inside dbt by using dbt config.
🌈 1
b

Bartosz Kopytek

01/19/2023, 3:55 PM
Awesome, thanks!