google / orchestra

Advertising Data Lakes and Workflow Automation
Apache License 2.0
48 stars 27 forks source link

request = self.hook.get_service().queries().createquery(body=report_body) is returning an Attribute error. #25

Open ghost opened 3 years ago

ghost commented 3 years ago

When running a DAG on Airflow 2.1 on a VM, the spindle DAG (create_report) is returning an attribute error in the code: AttributeError: 'Resource' object has no attribute 'queries' I am not understanding what is the reason, since on composer it seemed to have worked fine.

Jdban commented 3 years ago

That's the error that python throws when the API version is outdated. Looks like the code is using v1 which is deprecated.

image

The API version is specified in 3 places in the code apparently and needs to be updated. Ideally it is only specified in one location of course.

Also the CM360 API version looks to be outdated too (v3.3 deprecates tomorrow)

image

So to fix it yourself, update those version strings and it should work.

I'm not sure who at Google is in charge of this, but ideally they can update all of these and also consolidate the versioning into a single location.