Louis Auneau
03/29/2023, 3:53 PMrequired_resource_keys
to be specified for sensors. From what I understood I should use with_resources
in my repository. As follows:
@sensor(
job=my_job,
required_resource_keys={"my_resource"}
)
def my_sensor(context):
context.my_resource...
@repository
def my_repo():
return *with_resources(
definitions=[my_sensor],
resource_defs={'my_resource': my_resource}
)
When I do so I get this error :
'SensorDefinition' object has no attribute 'with_resources'
Is there anything I do wrong ?
Thank you by advance and have a nice day,
Louissean
03/29/2023, 3:59 PMDefinitions
does not require with_resources
, the sensors will be able to bind any resources passed to the Definitions
object.Louis Auneau
03/29/2023, 4:25 PM