Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bigquery: Support JSON, FLOAT PKey For Merge #1415

Merged
merged 10 commits into from
Mar 1, 2024

Conversation

Amogh-Bharadwaj
Copy link
Contributor

@Amogh-Bharadwaj Amogh-Bharadwaj commented Mar 1, 2024

Float, JSON (and other non-groupable types in bigquery) as primary key is not supported by our merge statement in BigQuery as during our primary key comparison, BigQuery cannot compare, for example, JSON values:

googleapi: Error 400: Equality is not defined for arguments of type JSON

This PR makes a step towards supporting such columns in primary keys for BigQuery merge by transforming it to string there for PARTITION BY and comparison
Test added

@Amogh-Bharadwaj Amogh-Bharadwaj changed the title Bigquery: Skip JSON Pkey For Merge Bigquery: Support JSON PKey For Merge Mar 1, 2024
@Amogh-Bharadwaj
Copy link
Contributor Author

Passing all tests except the dynamic signals one

@Amogh-Bharadwaj Amogh-Bharadwaj requested a review from serprex March 1, 2024 16:48
@Amogh-Bharadwaj Amogh-Bharadwaj changed the title Bigquery: Support JSON PKey For Merge Bigquery: Support JSON, FLOAT PKey For Merge Mar 1, 2024
@iskakaushik iskakaushik merged commit 84194d9 into main Mar 1, 2024
6 of 7 checks passed
@iskakaushik iskakaushik deleted the bigquery/json-pkey-cdc-2 branch March 1, 2024 16:55
serprex pushed a commit that referenced this pull request Mar 1, 2024
Float, JSON (and other [non-groupable types in
bigquery](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types#groupable_data_types
)) as primary key is not supported by our merge statement in BigQuery as
during our primary key comparison, BigQuery cannot compare, for example,
JSON values:
```
googleapi: Error 400: Equality is not defined for arguments of type JSON
```

This PR makes a step towards supporting such columns in primary keys for
BigQuery merge by transforming it to string there for `PARTITION BY` and
comparison
Test added
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants