:mod:`airflow.contrib.operators.postgres_to_gcs_operator` ========================================================= .. py:module:: airflow.contrib.operators.postgres_to_gcs_operator .. autoapi-nested-parse:: PostgreSQL to GCS operator. Module Contents --------------- .. data:: PY3 .. py:class:: PostgresToGoogleCloudStorageOperator(postgres_conn_id='postgres_default', *args, **kwargs) Bases: :class:`airflow.contrib.operators.sql_to_gcs.BaseSQLToGoogleCloudStorageOperator` Copy data from Postgres to Google Cloud Storage in JSON or CSV format. :param postgres_conn_id: Reference to a specific Postgres hook. :type postgres_conn_id: str .. attribute:: ui_color :annotation: = #a0e08c .. attribute:: type_map .. method:: query(self) Queries Postgres and returns a cursor to the results. .. method:: field_to_bigquery(self, field) .. method:: convert_type(self, value, schema_type) 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.