You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Mefta Sadat (Jira)" <ji...@apache.org> on 2019/09/23 18:33:00 UTC

[jira] [Created] (AIRFLOW-5542) Export a BigQuery query result to GCS

Mefta Sadat created AIRFLOW-5542:
------------------------------------

             Summary: Export a BigQuery query result to GCS
                 Key: AIRFLOW-5542
                 URL: https://issues.apache.org/jira/browse/AIRFLOW-5542
             Project: Apache Airflow
          Issue Type: New Feature
          Components: operators
    Affects Versions: 1.10.5
            Reporter: Mefta Sadat


h2. Problem

There is currently no direct operator to export a BQ query result dataset to GCS.
h2. Proposed implementation

This problem can be solved by creating a temporary table, storing the query results in the temp table, exporting the table to GCS and then finally deleting the table

The following methods in airflow.gcp.hooks.bigquery_hook can be leveraged to achieve this solution:

create_empty_dataset -> run_query -> run_extract -> run_table_delete -> delete_dataset

The proposer operator is just a wrapper around these methods. It executes the above-mentioned methods in the necessary order and handles any exceptions that may occur.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)