Improved SQL rendering within BigQueryInsertJobOperator
See original GitHub issueDescription
BigQueryInsertJobOperator
requires the submission of a configuration
parameter in the form of a dict. Unfortunately, if this contains a large SQL query - especially one that is formatted with new lines - then this cannot currently be rendered very nicely in the UI.
Use case / motivation
The issue with this is that it’s impossible to copy and paste the rendered query out of the Airflow UI, into a BigQuery browser and run it without lots of manual edits which is time wasted when troubleshooting problems.
Are you willing to submit a PR?
Yes. My current thought process around this would be to add an optional SQL parameter to the operator which, if provided, would be added into the configuration and could therefore have its own template field and SQL renderer.
e.g.
Issue Analytics
- State:
- Created 2 years ago
- Comments:22 (22 by maintainers)
Top GitHub Comments
Thanks @potiuk! Have been looking at this at times today and I’m definitely making some progress although it depends on whether @mehmax beats me to it!
A UI improvement seems like the right choice. https://github.com/apache/airflow/issues/17032#issuecomment-880795289
There are a ton of properties on job resource objects, so I’d be worried about the precedent for adding kwargs for each of them. Especially since query jobs aren’t the only kind of job