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

Charlie Bini

05/25/2023, 1:53 PM
Is it possible to yield a DataVersion for a SourceAsset from a sensor? Or do you have to run an op?
Use case: monitoring Google Sheets for updates. If the sensor detects that one of the sheets has been modified, I want it to update the DataVersion so that the downstream dbt asset will AutoMaterialize
o

owen

05/25/2023, 4:13 PM
hi @Charlie Bini! at the moment, you'll need to run an op. so one possible pattern would be an op that takes a list of modified sheets as config (emitting an AssetObservation for each of them), and have the sensor check for modified sheets and kick off a run with those sheets passed through the op's config. one thing to note is that right now, you'll still want to have observable source assets for each of the sources. those observable source assets don't need to do anything (you can manage the state purely with the sensor + op approach), but having those observable source assets tells Dagster to look for data versions for those assets. in the future, this would all be much more neatly handled by something like a multi_observable_source_asset
c

Charlie Bini

05/25/2023, 4:27 PM
ahh didn't consider a straight op, been in asset land too long
🌈 1