-
Notifications
You must be signed in to change notification settings - Fork 14.2k
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-4908] BigQuery Hooks/Operators for update_dataset, patch_dataset, get_dataset #5546
Conversation
self.delegate_to = delegate_to | ||
|
||
self.log.info('Dataset id: %s', self.dataset_id) | ||
self.log.info('Project id: %s', self.project_id) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would merge this log line with the previous one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make sense. I will merge them.
a8ea9f4
to
8c28fce
Compare
Codecov Report
@@ Coverage Diff @@
## master #5546 +/- ##
==========================================
+ Coverage 79% 79.03% +0.03%
==========================================
Files 489 489
Lines 30726 30796 +70
==========================================
+ Hits 24275 24341 +66
- Misses 6451 6455 +4
Continue to review full report at Codecov.
|
Are you planning to continue working on this change? This week, I would like to deal with PR reviews related to GCP. I would be happy if you would respond to all comments |
def __init__(self, | ||
dataset_id, | ||
project_id=None, | ||
bigquery_conn_id='google_cloud_default', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bigquery_conn_id='google_cloud_default', | |
gcp_conn_id='google_cloud_default', |
Reference:
#5734
dataset_id, | ||
dataset_resource, | ||
project_id=None, | ||
bigquery_conn_id='google_cloud_default', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bigquery_conn_id='google_cloud_default', | |
gcp_conn_id='google_cloud_default', |
Reference:
#5734
dataset_id, | ||
dataset_resource, | ||
project_id=None, | ||
bigquery_conn_id='google_cloud_default', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bigquery_conn_id='google_cloud_default', | |
gcp_conn_id='google_cloud_default', |
Reference:
#5734
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only one small things - bigquery_conn_id
=> gcp_conn_id
… patch_dataset and get_dataset Implement BigQuery Hooks/Operators for update_dataset, patch_dataset and get_dataset
8c28fce
to
c52ee64
Compare
@mik-laj Done. PTAL |
… patch_dataset and get_dataset (apache#5546) Implement BigQuery Hooks/Operators for update_dataset, patch_dataset and get_dataset (cherry picked from commit 09b9610)
To create a BigQuery sink for GCP Stackdriver Logging, I have to assign
WRITER
access to group[email protected]
to access BQ dataset. However, current BigQueryHook doesn't support updating/patching dataset.Reference: https://googleapis.github.io/google-cloud-python/latest/logging/usage.html#export-to-bigquery
Implement GCP Stackdriver Logging: AIRFLOW-4779
While it is missing update_dataset and patch_dataset, BigQueryHook has get_dataset but it doesn't have operator for it.
Features to be implemented:
BigQueryBaseCursor.patch_dataset
BigQueryBaseCursor.update_dataset
BigQueryPatchDatasetOperator
BigQueryUpdateDatasetOperator
BigQueryGetDatasetOperator
Make sure you have checked all steps below.
Jira
Description
Tests
test_bigquery_operator:BigQueryPatchDatasetOperatorTest
test_bigquery_operator:BigQueryGetDatasetOperatorTest
test_bigquery_operator:BigQueryUpdateDatasetOperatorTest
test_bigquery_hook:TestDatasetsOperations.test_patch_dataset
test_bigquery_hook:TestDatasetsOperations.test_update_dataset
Commits
Documentation
Code Quality
flake8