Skip to content

Commit

Permalink
Fix: Handle nullable datetimes in BigQuery (#510)
Browse files Browse the repository at this point in the history
  • Loading branch information
csansoon authored Jun 12, 2024
1 parent 40bdacc commit b6205cf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/short-wasps-nail.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@latitude-data/bigquery-connector": patch
---

Getting Date/DateTime columns with null results no longer throws an error
2 changes: 1 addition & 1 deletion packages/connectors/bigquery/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ export default class BigQueryConnector extends BaseConnector<ConnectionParams> {
if (!field) return value

if (field.type === DataType.Datetime) {
return (value as { value: unknown })['value']
return (value as { value: unknown })?.['value']
} else {
return value
}
Expand Down

0 comments on commit b6205cf

Please sign in to comment.