More of a query around functionality, than a suppo...
# ask-community
d
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
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
Amazing
thank you
y
d
oh yours is more comprehensive than mine, I'll close mine
👍 1
thanks for checking this out though 🙂
y
You're welcome!