airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [airflow] nathadfield edited a comment on issue #17032: Improved SQL rendering within BigQueryInsertJobOperator
Date Fri, 16 Jul 2021 07:55:09 GMT

nathadfield edited a comment on issue #17032:
URL: https://github.com/apache/airflow/issues/17032#issuecomment-881248692


   @kaxil It doesn't look like it.
   
   ```
   sql = '''
       INSERT INTO `target_project.target_dataset.target_table`
       (col1, col2, col3, col4)
       SELECT col1, col2, col3, col4
       FROM `source_project.source_dataset.source_table`
       '''
   
       test = BigQueryInsertJobOperator(
           task_id='test',
           gcp_conn_id='my_gcp_connection',
           configuration={"query": {"query": sql.strip(),
                                    "useLegacySql": False}
                          }
       )
   ```
   
   <img width="1668" alt="Screenshot 2021-07-16 at 08 48 04" src="https://user-images.githubusercontent.com/967119/125911821-e86cc2ca-8eb7-4aef-a4bb-4fbaf907de7f.png">
   
   The new lines characters before `INSERT` and after the trailing '`' have been removed but
everything in between has not.
   
   Regardless, I still wouldn't want a large SQL query with formatting to aid readability
to be reduced to a single line character string.  That wouldn't be helpful. 


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



Mime
View raw message