KevinKobi opened a new issue #8387: PostgresToGCSOperator doesn't convert DATE 
correctly
URL: https://github.com/apache/airflow/issues/8387
 
 
   
   **What happened**:
   
   Time datatypes are treated as datetime in the operator this create problems 
when dumping to csv (so can be loaded to BigQuery) because the data will be 
date type yet bigquery will expect datetime format.
   
   **How to reproduce it**:
   dump DATE column to csv using the operator and create a table from it in 
bigquery. The column will not be of DATE format.
   
   **Anything else we need to know**:
   
   probably need fix at 
https://github.com/apache/airflow/blob/master/airflow/providers/google/cloud/operators/postgres_to_gcs.py#L46
 changing it from `TIMESTAMP`  to `DATE` as:
   ```
     Date                  -> 1082
     Time                  -> 1083
     Timestamp             -> 1114
     TimestampWithTimeZone -> 1184
   ```
   https://github.com/psycopg/psycopg2/blob/master/psycopg/pgtypes.h#L41
   
   and make some adjustments in `convert_type` function.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to