0

I am trying to perform exposure extraction from my dbt models. I am following this example. My exposure file is being generated but I want to exclude some collections from Metabase. This is my current code:

dbt-metabase exposures \
    --dbt_manifest_path ./target/manifest.json \
    --dbt_database {db name} \
    --metabase_host metabase.{myhost}.com \
    --metabase_user {myuser}@{domain}.com \
    --metabase_password {my password} \
    --metabase_database {db name} \
    --output_path ./models/ \
    --output_name metabase_exposures \
    --collection_excludes 'Our analytics', ABI-queries_SiHay_DEPRECATED, Dashboards_2-1_DEPRECATED, Old _KiWi_DEPRECATED, x_Dashboards_2-0_DEPRECATED

When running that block of code everything seems to work but it's not really excluding those collections.

brenda
  • 656
  • 8
  • 24
  • I think this applies: https://stackoverflow.com/questions/75600390/exclude-multiple-models-from-run/75607081#75607081 – Adam Kipnis Mar 15 '23 at 22:17
  • Does this answer your question? [Exclude multiple models from run](https://stackoverflow.com/questions/75600390/exclude-multiple-models-from-run) – Adam Kipnis Mar 16 '23 at 22:44

1 Answers1

0

I figured it out on my own. The error it's in the commas. The --collection_excludes command receives a list and that's why I was using the commas but are not required. The final code should looks like this:

dbt-metabase exposures \
    --dbt_manifest_path ./target/manifest.json \
    --dbt_database {db name} \
    --metabase_host metabase.{myhost}.com \
    --metabase_user {myuser}@{domain}.com \
    --metabase_password {my password} \
    --metabase_database {db name} \
    --output_path ./models/ \
    --output_name metabase_exposures \
    --collection_excludes 'Our analytics' ABI-queries_SiHay_DEPRECATED Dashboards_2-1_DEPRECATED Old_KiWi_DEPRECATED x_Dashboards_2-0_DEPRECATED
brenda
  • 656
  • 8
  • 24