airflow.contrib.operators.postgres_to_gcs_operator

PostgreSQL to GCS operator.

Module Contents

airflow.contrib.operators.postgres_to_gcs_operator.PY3[source]
class airflow.contrib.operators.postgres_to_gcs_operator.PostgresToGoogleCloudStorageOperator(postgres_conn_id='postgres_default', *args, **kwargs)[source]

Bases: airflow.contrib.operators.sql_to_gcs.BaseSQLToGoogleCloudStorageOperator

Copy data from Postgres to Google Cloud Storage in JSON or CSV format.

Parameters

postgres_conn_id (str) – Reference to a specific Postgres hook.

ui_color = #a0e08c[source]
type_map[source]
query(self)[source]

Queries Postgres and returns a cursor to the results.

field_to_bigquery(self, field)[source]
convert_type(self, value, schema_type)[source]

Takes a value from Postgres, and converts it to a value that’s safe for JSON/Google Cloud Storage/BigQuery. Dates are converted to UTC seconds. Decimals are converted to floats. Times are converted to seconds.

Was this entry helpful?