Danny Steffy
04/11/2023, 9:14 PMclaire
04/11/2023, 10:27 PMDefinitions
object:
@sensor(job=my_job, required_resource_keys={"my_resource"})
def my_sensor(context):
files_to_process = context.my_resource.get_files()
...
@sensor(job=my_job)
def my_sensor(context, my_resource: MyResource):
files_to_process = my_resource.get_files()
...
claire
04/11/2023, 10:29 PMAlex Orlovskyi
04/12/2023, 5:10 PMMegan Beckett
06/01/2023, 1:49 PMMegan Beckett
06/01/2023, 2:09 PMrun_config
to a sensor with a resource as the config file will contain the database connection details required to connect to and query the database and then trigger the sensor run if a certain condition in the database is met?Danny Steffy
06/01/2023, 2:38 PM@sensor
and then adding the required_resource_keys
to that, and in the body of the sensor I'm using context.instance.get_runs
to filter for the specific job run that I'm looking for