Google Cloud BigQuery 傳輸運算子至 BigQuery

Google Cloud BigQuery 是 Google Cloud 的無伺服器資料倉儲產品。此運算子可用於將資料從一個 BigQuery 表格複製到另一個表格。

先決條件任務

要使用這些運算子,您必須執行以下幾項操作

運算子

從一個 BigQuery 表格複製資料到另一個表格,是透過 BigQueryToBigQueryOperator 運算子執行。

使用 Jinja 模板 以及 source_project_dataset_tablesdestination_project_dataset_tablelabelsimpersonation_chain 來動態定義值。

您可以包含多個來源表格,以及定義 write_dispositioncreate_disposition。如需更多資訊,請參考以上連結。

複製 BigQuery 表格

以下運算子將資料從一個或多個 BigQuery 表格複製到另一個表格。

tests/system/google/cloud/bigquery/example_bigquery_to_bigquery.py[原始碼]

copy_selected_data = BigQueryToBigQueryOperator(
    task_id="copy_selected_data",
    source_project_dataset_tables=f"{DATASET_NAME}.{ORIGIN}",
    destination_project_dataset_table=f"{DATASET_NAME}.{TARGET}",
)

參考

如需更多資訊,請查看

此條目是否有幫助?