fix setting project_id for gs to bq and bq to gs#30053
fix setting project_id for gs to bq and bq to gs#30053potiuk merged 8 commits intoapache:mainfrom Yaro1:bug-project_id-GCSToBigQueryOperator
Conversation
|
Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contribution Guide (https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst)
|
|
Can't understand the error in Static checks |
|
Likely intemittent problem (node installation failed due to conectivity ?) |
|
oh, got it, thanks |
|
:( |
|
Awesome work, congrats on your first merged pull request! |
| return hook.insert_job( | ||
| configuration=configuration, | ||
| project_id=hook.project_id, | ||
| project_id=configuration["extract"]["sourceTable"]["projectId"], |
There was a problem hiding this comment.
@Yaro1 May I know the reason why we hard code the project id from sourceTable? We got the issue when we try to extract data from Project A but we want to submit job by using our own Project B. This line does not allow us to use our default project id.
There was a problem hiding this comment.
@sleepy-tiger I agree, we also have this issue. I think the original bug report was based on a misunderstanding of the error, and while this fix does incidentally support the reporter's gcp configuration, I think that is mostly an accident, and it also breaks many other use cases.
see also https://github.com/apache/airflow/pull/30053/files#diff-875bf3d1bfbba7067dc754732c0e416b8ebe7a5b722bc9ac428b98934f04a16fR512 and https://github.com/apache/airflow/pull/30053/files#diff-875bf3d1bfbba7067dc754732c0e416b8ebe7a5b722bc9ac428b98934f04a16fR587, which override the project_id that the user passes in, making it impossible to use a project_id other than what is specified in the source or destination tables. In general, more clarity is needed in distinguishing between which projects are being used for storage, and which are being used for compute.
I plan on filing an issue about this later today if one doesn't already exist, and I'll update here
There was a problem hiding this comment.
I was closing old tabs and realized I never updated here -- the issue I filed is here: #32106, and it has been resolved to my satisfaction. You can find links to the relevant conversations from that issue, it got kind of complicated with multiple issues filed and such
closes: #29958