Quick query: Does anybody aware about how to execu...
# integration-dbt
t
Quick query: Does anybody aware about how to execute
dbt_metrics_default_calendar
dbt model from
dbt_packages/metrics
. I am using DBT metrics to create few models. So those metrics are depends upon
dbt_metrics_default_calendar
dbt model, from
dbt_packages/metrics
. But I am unable to execute the
dbt_metrics_default_calendar
from dagster asset. Running dbt command is not picking
dbt_metrics_default_calendar
. Its picking all the custom models defined by me in the
DBT_ROOT_DIR
path except default calendar model from the package.
Warehouse: Snowflake
dbt_metrics: 1.3.0 --version
dbt=1.3.1
o
hi @Tejas I'm not able to replicate this issue -- I took the existing
assets_dbt_python
example, added
Copy code
packages:
  - package: dbt-labs/metrics
    version: 1.3.2
as a packages.yml file, and ran
dbt deps
. This caused the
dbt_metrics_default_calendar
model to show up in the asset graph, as expected. Clicking on just that model and executing it generated the following command:
Copy code
Executing command: dbt --no-use-color --log-format json run --project-dir /Users/owen/src/dagster/examples/assets_dbt_python/assets_dbt_python/../dbt_project --profiles-dir /Users/owen/src/dagster/examples/assets_dbt_python/assets_dbt_python/../dbt_project/config --select metrics.dbt_metrics_default_calendar
which completed successfully. I also tried adding this as a dependency to an existing model (
-- depends on: {{ ref("dbt_metrics_default_calendar") }}
) which worked as expected (both in the asset graph and when executing) I did notice (from the dbt slack thread) that you had your metrics configured to write to a different database than your, which could potentially be causing problems?
if you just click on the
dbt_metrics_default_calendar
asset and try to materialize it, what command gets generated?
t
I have tried the same but same didnt work for me
o
what happens when you click on
dbt_metrics_default_calendar
and try to materialize it? does a run not start for that one asset, or does a run start that selects no models? or something else
t
When I try to materialize single asset the run starts but it does not do anything.
@owen How can I execute an asset with the downstream dependency using Dagster?
@owen My issue has been resolved. It was due to wrong asset selection in the Dagster. Initially I had used
selection.downstream
to select the assets and then materialize it. As
dbt_metrics_default_calendar
is not a downstream of any of the asset
selection.all()
was required. Thank you so much !! for helping me out to debug this issue.
o
glad you got it working!
🎉 1
t
@owen Hi There, I am using dagster-meltano setup for EL process. Is there a way to full refresh any of the single source table from the materialize config?
o
hi!
dagster-meltano
is not actually maintained by the dagster core team (here's the github project: https://github.com/quantile-development/dagster-meltano). I'm not very familiar with meltano or that package unfortunately.