Ryan Meekins
04/04/2023, 7:06 PMSourceAsset
. I'd like to track which rows of information have been sent to the external system or have been updated since the last time the job was run. I'd like to use dagster to track this state information. I feel like I need to use an asset
for this tracking, but this asset would need to be used as an input and output of my job (since the job will alter this state). Is this possible or is there a better way of keeping this state information with dagster? To do this without dagster, I'd manually read and write from a state file in my job but I'd prefer to let dagster handle this IO.sandy
04/05/2023, 12:00 AMcontext.instance.get_latest_materialization_event(asset_key)
Ryan Meekins
04/05/2023, 3:06 PMRyan Meekins
04/05/2023, 3:14 PMSourceAsset
sandy
04/05/2023, 3:55 PMRyan Meekins
04/06/2023, 1:40 PMSourceAsset
because both have the same AssetKey
. Is there a way to select a table as a SourceAsset
but use a different key? I'm not seeing this in the docssandy
04/06/2023, 4:42 PMIs there a way to select a table as aI'm not 100% following what you mean by this. Do you have a short code example of how you'd like this to work?but use a different key?SourceAsset
Ryan Meekins
04/06/2023, 5:40 PMAsset
that I'd like to bring back in as a SourceAsset
(to be able to store and update a job's state) but it's not working because they both have the same AssetKey
, so I'd need something like this:
my_current_state = SourceAsset(
key="my_current_state", # a unique AssetKey for dagster
table_name="state", # the table name in Snowflake, which is a dagster asset
)
sandy
04/06/2023, 9:20 PM