Skip to content

Conversation

@lihan
Copy link
Contributor

@lihan lihan commented Jun 14, 2022

Traceback

Traceback (most recent call last):
  File "/home/airflow/.local/lib/python3.8/site-packages/airflow/providers/google/cloud/transfers/bigquery_to_gcs.py", line 128, in execute
    conf = job["configuration"]["extract"]["sourceTable"]
TypeError: 'ExtractJob' object is not subscriptable

The job is an ExtractJob object and cannot read its source table using subscript. So the code fixes it using object properties.

Since BigQueryTableLink is optional, using if to check it indeed returns an ExtractJob (part of BigQueryJob Union type).

@lihan lihan requested a review from turbaszek as a code owner June 14, 2022 12:20
@boring-cyborg boring-cyborg bot added area:providers provider:google Google (including GCP) related issues labels Jun 14, 2022
@potiuk
Copy link
Member

potiuk commented Jun 14, 2022

Yep. Some fixes needed @lihan :)

@potiuk
Copy link
Member

potiuk commented Jun 14, 2022

Ci is telling what to fix

@lihan lihan force-pushed the bigquery-provider-fix branch from 36e54c6 to f5b1853 Compare June 14, 2022 22:58
Fixing instance check

Pass static analysis
@lihan lihan force-pushed the bigquery-provider-fix branch from ea9d2ee to 882f1c6 Compare June 15, 2022 00:03
@potiuk
Copy link
Member

potiuk commented Jun 15, 2022

Superseded by #24416

@potiuk potiuk closed this Jun 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:providers provider:google Google (including GCP) related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants