Skip to content

Commit 6480a1d

Browse files
committed
feat(bigquery): support DATE columns
Fixes talkiq#987
1 parent 55d1ba5 commit 6480a1d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

bigquery/gcloud/aio/bigquery/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ def parse(field: dict[str, Any], value: Any) -> Any:
7777
),
7878
'BOOLEAN': lambda x: x == 'true',
7979
'BYTES': bytes,
80+
'DATE': datetime.date.fromisoformat,
8081
'FLOAT': float,
8182
'INTEGER': int,
8283
'NUMERIC': lambda x: decimal.Decimal(
@@ -90,7 +91,6 @@ def parse(field: dict[str, Any], value: Any) -> Any:
9091
}[field['type']]
9192
except KeyError:
9293
# TODO: determine the proper methods for converting the following:
93-
# DATE -> datetime?
9494
# DATETIME -> datetime?
9595
# GEOGRAPHY -> ??
9696
# TIME -> datetime?

0 commit comments

Comments
 (0)