Is there a way in which I can run two dbt transfor...
# best-practices
d
Is there a way in which I can run two dbt transforms after a pipeline? e.g. a tap specific one, and then another generic one that I want to run after every pipeline?
More accurately, I suppose I want to combine two sets of models. Some from an external package, and some from my
transform/
folder.
The scenario is I have some custom taps, and everything goes to postgres so I have
tap_A -> target_postgres
and there is a
dbt-tap-a
custom transform I also have
tap_B -> target_postgres
(on a different schedule) and a corresponding
dbt-tap-b
custom transform. After both pipelines, I want to run a custom merge step, but I'm not sure how to get Meltano/DBT to see ALL my models, and not just the ones from say
dbt-tap-a
Copy code
dbt     | Running with dbt=0.19.1
dbt     | [WARNING]: Configuration paths exist in your dbt_project.yml file which do not apply to any resources.
dbt     | There are 1 unused configuration paths:
dbt     | - models.my_meltano_project.ods
dbt     |
dbt     | Found 21 models, 0 tests, 0 snapshots, 0 analyses, 326 macros, 0 operations, 0 seed files, 0 sources, 0 exposures
dbt     | The selector '' does not match any nodes and will be ignored
dbt     | The selector 'my_meltano_project' does not match any nodes and will be ignored
Here's my
dbt_project.yml
Copy code
name: my_meltano_project
version: 0.0.1

profile: meltano
config-version: 2

source-paths:
  - sources
analysis-paths:
  - analysis
test-paths:
  - tests
data-paths:
  - data
macro-paths:
  - macros
snapshot-paths:
  - snapshots

clean-targets:
- ../.meltano/transformers/dbt/target
- dbt_modules
- logs

target-path: ../.meltano/transformers/dbt/target
modules-path: dbt_modules
log-path: logs

models:
  my_meltano_project:
    ods:
      +schema: ods
      materialized: merge
and
packages.yml
Copy code
packages:
  - local: dbt-tap-a
  - local: dbt-tap-b
and my folder structure is roughly:
Copy code
transform/
    dbt-tap-a/          # git submodule
    dbt-tap-b/          # git submodule
    models/
        ods/
            files.sql
            files.sql
            files.sql
e
@gunnar