Bug: datetime logic in copy_deduplicate
Closes https://github.com/mozilla/bigquery-etl/issues/376 Addition to datetime.date considers only the days part of a timedelta, so we have to convert to a timestamp first.
This commit is contained in:
Родитель
5aecb85a37
Коммит
29f44ebbf5
|
@ -238,7 +238,8 @@ def get_query_job_configs(client, stable_table, date, dry_run, hourly, priority)
|
|||
if hourly:
|
||||
stable_table = client.get_table(stable_table)
|
||||
for hour in range(24):
|
||||
value = (date + timedelta(hours=hour)).isoformat()
|
||||
dt = (datetime(*date.timetuple()[:6]) + timedelta(hours=hour))
|
||||
value = dt.isoformat()
|
||||
yield bigquery.QueryJobConfig(
|
||||
destination=get_temporary_table(
|
||||
client=client,
|
||||
|
|
Загрузка…
Ссылка в новой задаче