gluent / goe

GOE: a simple and flexible way to copy data from an Oracle Database to Google BigQuery.
Apache License 2.0
8 stars 2 forks source link

Consider time zone in BigQuery job config #200

Closed nj1973 closed 2 months ago

nj1973 commented 3 months ago

If a customer has changed their BigQuery default time zone from UTC then we may get unexpected results when selecting DATE or DATETIME values, such as the max for partition columns.

We should consider overriding any project settings with UTC in GOE code:

job_config = bigquery.QueryJobConfig(
    connection_properties=[bigquery.ConnectionProperty("time_zone", "UTC")]
)
google_client = bigquery.Client(
    ...
    default_query_job_config=job_config,
)