Miguel Caballero Pinto
06/05/2023, 2:10 PMAttributeError: 'generator' object has no attribute 'get_client'
The code of the sensor is like this:
@sensor(job=person_enrichment_job_input_job)
def person_enrichment_job_input_sensor(
context: SensorEvaluationContext,
bigquery: BigQueryResource,
):
with bigquery.get_client() as client:
.....
It fails when calling get_client
function. Any idea of what may be going wrong? Is there a difference in the implementation of using resources on sensors vs assets?Miguel Caballero Pinto
06/05/2023, 2:14 PMbigquery
I get this:
<generator object BigQueryResource.get_object_to_set_on_execution_context at 0x28ff5d6d0>
Miguel Caballero Pinto
06/05/2023, 2:20 PMBigQueryResource
instance insteadMiguel Caballero Pinto
06/05/2023, 2:21 PMjamie
06/05/2023, 3:25 PMCharlie Bini
06/27/2023, 5:01 PMCharlie Bini
06/27/2023, 5:01 PMnext(resources.db_bigquery)
but that seems kinda oddjamie
06/27/2023, 5:27 PMben
06/27/2023, 5:30 PM