SQL to Google Sheets Transfer Operators¶
With Google Sheets, everyone can work together in the same spreadsheet at the same time. Use formulas functions, and formatting options to save time and simplify common spreadsheet tasks.
Upload data from SQL to Google Sheets¶
To upload data from and Database using SQL to Google Spreadsheet you can use the
SQLToGoogleSheetsOperator
.
upload_gcs_to_sheet = SQLToGoogleSheetsOperator(
task_id="upload_sql_to_sheet",
sql=SQL,
sql_conn_id="database_conn_id",
spreadsheet_id=NEW_SPREADSHEET_ID,
)
You can use Jinja templating with
sql
, spreadsheet_id
, spreadsheet_range
, impersonation_chain
.