ying-w commented on code in PR #30655:
URL: https://github.com/apache/airflow/pull/30655#discussion_r1167567344
##########
airflow/providers/google/cloud/hooks/bigquery.py:
##########
@@ -2077,6 +2082,9 @@ def run_query(
labels = labels or self.labels
schema_update_options = list(schema_update_options or [])
+ if priority:
+ self.priority = priority
+
Review Comment:
I'm OK working off `BigQueryHook()` but was wondering if the preferred way
to submit arbitrary sql is to leverage `SQLExecuteQueryOperator()` under
commons.
I'm pretty new to airflow and wasn't sure when I should start with operator
vs starting with hook. It didn't seem like there was an obvious way of passing
in a modified hook into `SQLExecuteQueryOperator()`
If I use `BigQueryInsertJobOperator()` (the bigquery specific way of doing
`SQLExecuteQueryOperator()`) then I would need to create a custom operator
based on `BigQueryInsertJobOperator()` that overwrites `_submit_job()` since
that calls `BigQueryHook()` and operator class also doesn't have `priority` as
a class attribute.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]