clay
03/22/2023, 10:03 PM@asset(required_resource_keys={"snowflake"}, compute_kind="Python")
def calc_jira_kpis(context: OpExecutionContext, jira_tickets_source_asset: pd.DataFrame) -> None:
"""
Calculate Jira-derived KPIs.
"""
.... stuff
return None
jamie
03/23/2023, 1:57 PM@asset(required_resource_keys={"snowflake"}, compute_kind="Python")
def calc_jira_kpis(context: OpExecutionContext, ed_crm_dash_crm_jira_tickets_consolidated: pd.DataFrame) -> None:
"""
Calculate Jira-derived KPIs.
"""
.... stuff
return None
or you might need to do this so that the all upper case of the asset key works (i’m not sure if we do case sensitive matching or not)
@asset(required_resource_keys={"snowflake"},
compute_kind="Python",
ins={jira_tickets_source_asset: AssetIn(AssetKey("ED_CRM_DASH_CRM_JIRA_TICKETS_CONSOLIDATED"))
)
def calc_jira_kpis(context: OpExecutionContext, jira_tickets_source_asset: pd.DataFrame) -> None:
"""
Calculate Jira-derived KPIs.
"""
.... stuff
return None
The sticking point is that dagster matches on asset key, not the variable name of the source asset. it’s explained in the note of this example https://docs.dagster.io/concepts/assets/software-defined-assets#defining-external-asset-dependenciesclay
03/23/2023, 2:07 PMclay
03/23/2023, 2:08 PMED_CRM_DASH_CRM_JIRA_TICKETS_CONSOLIDATED
jamie
03/23/2023, 2:08 PMjamie
03/23/2023, 2:08 PM