Skip to content

Emitting MaterializeResult whilst returning a value #26198

Answered by alangenfeld
christeefy asked this question in Q&A
Discussion options

You must be logged in to vote

You can switch from MaterializeResult to Output when you want to return a value in addition to metadata

@asset
def latest_data_load_date():
    latest_date = "..."
    return Output(latest_date, metadata={"latest_data_load_date": MetadataValue.timestamp(latest_date)})

will follow up on the right place to put this in the docs

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@v1gnesh
Comment options

@alangenfeld
Comment options

@christeefy
Comment options

Answer selected by christeefy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
area: asset Related to Software-Defined Assets
3 participants