https://dagster.io/ logo
#ask-community
Title
# ask-community
d

Daniel Kim

07/18/2022, 4:42 PM
Hello! Is there a way in dagit to show asset lineage between jobs? I have a contrived example where I am fetching vehicle manufacturers information and then uploading it to Snowflake. Then a 2nd job that just fetches the manufacturer IDs from that table. That 2nd job is triggered with an asset sensor where the "triggering" asset that it is monitoring is the "upload_mfrs_to_snowflake" asset from the 1st job.
But in dagit, it doesn't visually show the relationship between the 2nd job's asset and the 1st job's asset. Below is what I was expecting or hoping dagit would show:
j

jamie

07/18/2022, 4:52 PM
Hi @Daniel Kim you can specify the relationship between assets by specifying as inputs. So you could have something like this
Copy code
@asset 
def manufacturers():
    # gets mfrs
    return mfrs

@asset 
def manufacturer_id_list(manufacturers)
    # get id_list from manufacturers
    return id_list
and then you can still make your jobs from individual assets for your sensors, and the relationship should show up in dagit too
d

Daniel Kim

07/18/2022, 4:58 PM
@jamie Ah gotcha! I should have mentioned that I thought that since in my asset_sensor definition, it specified the asset_key to monitor via asset_key=AssetKey("upload_mfrs_to_snowflake"), I thought it would automatically build that relationship in dagit. But I see now that you're saying I still need to explicitly define the relationship.
s

sandy

07/20/2022, 12:08 AM
btw, if your downstream asset doesn't need Dagster to load the values with an IO manager,
non_argument_deps
to specify the dependency in a lightweight way
👍 1
2 Views