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

Daniel Galea

03/22/2023, 10:52 AM
Hey everyone 🙂 I am looking into Asset Lineage and I'm wondering how I can connect assets so that I can view their lineage in the UI. I've been reading this page and it seems that I can form lineage by having one asset depend on the other, in this manner:
Copy code
@asset(ins={"upstream_asset": AssetIn(key_prefix="one/two/three")})
def downstream_asset(upstream_asset):
    return upstream_asset + [4]
However, in my case my downstream assets do not require the upstream asset as an input. I generally have one job which acts as an ingestion job and when that is done I explicitly materialize an asset which in turn triggers another job which is the transformation job and has a sensor that is triggered by that asset materialization. So materialization of asset 1 triggers the materialization of asset 2. I am not passing data from one step to the next in Dagster as I didn't want to couple my transformation code with it. How can I link assets but also not require passing them around?
dagster bot responded by community 1
r

Rasmus Bonnevie

03/22/2023, 11:10 AM
hi, you're looking for the
non_argument_deps
parameter on the asset decorator which does exactly that 🙂 it's just a set of the asset keys you want as dependencies without passing data.
d

Daniel Galea

03/22/2023, 12:08 PM
Hi Rasmus, okay thanks 🙂 and is there a way to specify if its upstream or downstream?
r

Rasmus Bonnevie

03/22/2023, 12:12 PM
dependencies are always specified on the downstream node as far as I know, I don't think you can specify "child assets". The only exception to this pattern I can think of is specifying dependencies for multi-assets, https://docs.dagster.io/concepts/assets/multi-assets#dependencies-inside-multi-assets but doesn't sound like that's what you are looking for
🌈 1
d

Daniel Galea

03/22/2023, 1:08 PM
Got it, thanks! 🙂