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

Drew Sonne

08/24/2021, 8:16 AM
More of a query around functionality, than a support request: I'm using Asset Materialisations in each solid and have a single pipeline moving my data from ingestion, through different stages of the data environment. I was thinking to maintain a sense of lineage between assets across a pipeline, I would use
EventMetadata.asset(...)
to link them, but it doesn't seem to work as the asset from previous solids isn't available for subsequent solid executions. Am I correct in saying the assets is only available for referencing once the pipeline execution has finished?
Copy code
metadata={
    "source_asset": EventMetadata.asset(AssetKey(["foo-bar","hello-world"])),
    ...
}
gives
Copy code
dagster.core.errors.DagsterInvalidEventMetadata: Could not resolve the metadata value for "source_asset" to a known type. Consider wrapping the value with the appropriate EventMetadata type.
y

Yassine Marzougui

08/24/2021, 9:11 AM
It seems to be a bug. Both
DagsterAssetMetadataEntryData
and
DagsterPipelineRunMetadataEntryData
(which are part of the EntryDataUnion) are missing from this line. Adding
DagsterAssetMetadataEntryData
seems to fix your error.
d

Drew Sonne

08/24/2021, 10:05 AM
Amazing
thank you
y

Yassine Marzougui

08/24/2021, 10:17 AM
d

Drew Sonne

08/24/2021, 10:31 AM
oh yours is more comprehensive than mine, I'll close mine
👍 1
thanks for checking this out though 🙂
y

Yassine Marzougui

08/24/2021, 10:42 AM
You're welcome!