How to add "kinds" parameter to a dbt asset? #33381
Unanswered
ssillaots-boku
asked this question in
Q&A
Replies: 1 comment 3 replies
-
|
Hi @ssillaots-boku , you should be able to do this in the translator, or if using Create a custom translator class and override get_asset_spec() to return an AssetSpec with the kinds parameter: from dagster_dbt import DagsterDbtTranslator
from dagster import AssetSpec
class CustomDbtTranslator(DagsterDbtTranslator):
def get_asset_spec(self, dbt_resource_props):
default_spec = super().get_asset_spec(dbt_resource_props)
return default_spec._replace(kinds=["dbt", "snowflake"]) # ExampleCreate a custom component subclass and override from dagster_dbt import DbtProjectComponent
from dagster import AssetSpec
class CustomDbtComponent(DbtProjectComponent):
def get_asset_spec(self, dbt_resource_props):
spec = super().get_asset_spec(dbt_resource_props)
return spec._replace(kinds=["dbt", "custom_kind"]) |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I want to add custom
kindsto a dbt asset. As far as I could tell that's not possible throughDagsterDbtTranslatorbecause ofIs there some other way to do it?
I know I can add metadata but that doesn't accomplish my goal here.
The goal is to visually supplement some assets in the lineage view with custom
kindswhich would give a quick and comprehensive overview of some assets uniqueness/type.Beta Was this translation helpful? Give feedback.
All reactions