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.
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