Skip to content
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

[AIRFLOW-6521]: add project param to bigQuery hook .getSchema method #7118

Merged
merged 4 commits into from Jan 13, 2020

Conversation

mtagle
Copy link
Contributor

@mtagle mtagle commented Jan 9, 2020


Issue link: AIRFLOW-6521

  • Description above provides context of the change
  • Commit message/PR title starts with [AIRFLOW-NNNN]. AIRFLOW-NNNN = JIRA ID*
  • Unit tests coverage for changes (not needed for documentation changes)
  • Commits follow "How to write a good git commit message"
  • Relevant documentation is updated including usage instructions.
  • I will engage committers as explained in Contribution Workflow Example.

* For document-only changes commit message can start with [AIRFLOW-XXXX].


In case of fundamental code change, Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in UPDATING.md.
Read the Pull Request Guidelines for more information.

@boring-cyborg boring-cyborg bot added the provider:google Google (including GCP) related issues label Jan 9, 2020
@codecov-io
Copy link

codecov-io commented Jan 9, 2020

Codecov Report

Merging #7118 into master will decrease coverage by 0.21%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #7118      +/-   ##
==========================================
- Coverage   85.17%   84.96%   -0.22%     
==========================================
  Files         683      683              
  Lines       39155    39155              
==========================================
- Hits        33352    33267      -85     
- Misses       5803     5888      +85
Impacted Files Coverage Δ
airflow/gcp/hooks/bigquery.py 91.4% <100%> (ø) ⬆️
airflow/kubernetes/volume_mount.py 44.44% <0%> (-55.56%) ⬇️
airflow/kubernetes/volume.py 52.94% <0%> (-47.06%) ⬇️
airflow/kubernetes/pod_launcher.py 45.25% <0%> (-46.72%) ⬇️
airflow/kubernetes/refresh_config.py 50.98% <0%> (-23.53%) ⬇️
...rflow/contrib/operators/kubernetes_pod_operator.py 78.31% <0%> (-20.49%) ⬇️
airflow/hooks/postgres_hook.py 94.36% <0%> (+1.4%) ⬆️
airflow/hooks/dbapi_hook.py 91.73% <0%> (+1.65%) ⬆️
airflow/utils/sqlalchemy.py 96.66% <0%> (+1.66%) ⬆️
airflow/operators/postgres_operator.py 100% <0%> (+100%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 28d8ef1...2d38b38. Read the comment docs.

@criccomini criccomini merged commit f653f2b into apache:master Jan 13, 2020
@@ -1453,17 +1453,21 @@ def get_dataset_tables(self, dataset_id: str, project_id: Optional[str] = None,
**optional_params).execute(num_retries=self.num_retries))

@CloudBaseHook.catch_http_exception
def get_schema(self, dataset_id: str, table_id: str) -> Dict:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you use @CloudBaseHook.fallback_to_default_project_id?

@mtagle mtagle deleted the bq_get_schema_project branch January 14, 2020 22:12
galuszkak pushed a commit to FlyrInc/apache-airflow that referenced this pull request Mar 5, 2020
…pache#7118)

BigQuery hook can now take project_id as a parameter, so that operators may specify project_ids other than the default specified in connection.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
provider:google Google (including GCP) related issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants