Content-Length: 273502 | pFad | http://github.com/apache/airflow/pull/24440

F5 Fixing TypeError: 'ExtractJob' object is not subscriptable by lihan · Pull Request #24440 · apache/airflow · GitHub
Skip to content

Fixing TypeError: 'ExtractJob' object is not subscriptable #24440

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

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








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/apache/airflow/pull/24440

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy