-
Notifications
You must be signed in to change notification settings - Fork 14.3k
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
Fix validation for BQ label values for BigQueryInsertJobOperator #39568
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 Contributors' Guide (https://github.com/apache/airflow/blob/main/contributing-docs/README.rst)
|
Setting the regex as
[1] https://cloud.google.com/bigquery/docs/labels-intro#requirements |
What about |
As mentioned in this line, as part of the label addition logic, the label keys used will be static, i.e. |
Awesome work, congrats on your first merged pull request! You are invited to check our Issue Tracker for additional contributions. |
On testing on a Cloud Composer environment with However, this appears to be because Airflow DAG names and task IDs do not work well if they start with hyphen as seen in the below example: However, I can confirm as seen below for a example BigQuery job that I created that BigQuery labels support labels starting with hyphens as mentioned above. But the BigQueryInsertJobOperator would not be able to create jobs with label values starting with hyphen since it appears that task IDs cannot start with hyphens. Hence, can you please let me know if this makes sense to remove the test case for the task starting with a hyphen since although Airflow allows to create a DAG/task starting with hyphen, it is not going to work as expected ? @eladkal |
This updates the label value validation logic for BigQuery label values as documented in the public documentation
closes: #39567