Hi, I’m looking to build upon the awesome Auto Mat...
# ask-community
m
Hi, I’m looking to build upon the awesome Auto Materializations for dbt projects to things that are downstream from a mart. In our case, we have written a generic
op
that will trigger a Tableau Refresh for a given report. We do Asset Materialization through yielding a
AssetMaterialization(asset_key=...)
. We would like to be able to specify that the Tableau Refresh op is dependent on the AssetKey of a mart in our dbt project. Then we would assign an
AutoMaterializationPolicy
so Dagster can trigger things automatically without us having to write a pipeline. Perhaps I’ve got lost in the docs but it doesn’t seem clear how this can be done. Any input would be appreciated 🙌
t
Hi! Have you thought of turning that
op
into an asset? You can just not return/yield anything at the end of the function. I think it's a fair option for an asset. the asset produced in this case is your tableau extract.
r
To add on to Tim, once you’ve converted your
op
into an asset, you can set it as a downstream dependency to your dbt models: https://docs.dagster.io/integrations/dbt/reference#downstream-dependencies
teamwork 1
m
Thanks, I’ll look into how that can be done thank you box Just a thought off the top of my head, the existing op is used as part of a defined pipeline and we would still like to trigger it as an op in an existing pipeline (graph). Is there a way to convert the asset into an op for that pipeline (from the perspective of code reuse. Can always copy the core code, but would like to avoid if possible)?