Skip to content

Improved SQL rendering within BigQueryInsertJobOperator #17032

Description

@nathadfield

Description

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.

Screenshot 2021-07-15 at 15 39 33

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.

Screenshot 2021-07-14 at 14 18 09

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions