If I do nothing with it, that works fine. If I try...
# integration-snowflake
c
If I do nothing with it, that works fine. If I try to include it as a parameter to an asset definition in code location 2, like this....
Copy code
@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
j
I think the name of the source asset in your downstream asset is wrong. it should be
Copy code
@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)
Copy code
@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-dependencies
❤️ 1
c
Ah, I see. Thank you for clarifying. I think I missed it in the docs because the variable name and the AssetKey are so similar. I'll try to read more carefully next time. 🙂
BTW, I was able to get it to work with the argument being
ED_CRM_DASH_CRM_JIRA_TICKETS_CONSOLIDATED
j
yeah it’s easy to miss
good to know!