Hi, I want to ask about dagster-dbt: My dbt-projec...
# ask-community
j
Hi, I want to ask about dagster-dbt: My dbt-project.yml look like this:
Copy code
models:
  data_platform:

    ingest:
      enabled: true
      materialized: view
      tags:
        - ingest
        - source
      optomate:
        tags:
          - optomate
        OPTOMATE_2000_060:
          tags:
            - OPTOMATE_2000_060
          schema: ingest_OPTOMATE_2000_060
        OPTOMATE_4507_031:
          tags:
            - OPTOMATE_4507_031
          schema: ingest_OPTOMATE_4507_031

    lake:
      enabled: true
      materialized: view
      tags:
        - lake
        - source
      optomate:
        tags:
          - optomate
        OPTOMATE_2000_060:
          tags:
            - OPTOMATE_2000_060
          schema: lake_OPTOMATE_2000_060
        OPTOMATE_4507_031:
          tags:
            - OPTOMATE_4507_031
          schema: lake_OPTOMATE_4507_031
In short, we have ingest and lake model for each source (
OPTOMATE_2000_060
,
OPTOMATE_4507_031
). for each source, the
dbt-asset
will have a different
partition.
Is there any way to using the
load_assets_from_dbt_project
to create the
dbt-asset
but only for one source. So I can have mutiple dbt-asset with different
partition
base on 1 dbt-project. Dbt models look like this
t
Evening! Yes! If you have a project with multiple partition definitions, you can use the ‘select’ argument in the load function to decide what dbt models/sources to load, and then explicitly set their partition for that load. Then you can repeat this for each partition definition you have and the models that follow them.
❤️ 1