Skip to content
This repository was archived by the owner on May 17, 2024. It is now read-only.

Compare JSON, ARRAY, STRUCT types in BigQuery (simplistically) #533

Merged
merged 1 commit into from
May 5, 2023

Conversation

nolar
Copy link
Contributor

@nolar nolar commented Apr 28, 2023

An attempt to make BigQuery's ARRAY & STRUCT column types suitable for comparison.

As of now, they are not supported at all, and data-diff does not even understand this type of columns. So the addition will only affect BigQuery and no other databases.

The comparison is rather simplistic — convert to JSON (lists & dicts correspondingly) and try to hash & compare those instead of the real arrays & structs.

This might be affected by different serialization results, such as different key ordering, different spacing & indenting in json, so on. This problem is to be solved separately in datafold/sqeleton#15.

Addresses: #445

@nolar nolar requested review from dlawin and pik94 April 28, 2023 10:33
@nolar nolar mentioned this pull request May 3, 2023
@nolar nolar changed the title Compare ARRAY & STRUCT types in BigQuery (simplistically) Compare JSON, ARRAY, STRUCT types in BigQuery (simplistically) May 3, 2023
@nolar nolar changed the base branch from master to simplify-json-columns May 3, 2023 16:20
@nolar nolar force-pushed the compare-bigquery-arrays-and-structs branch from acd3b08 to dcc2d44 Compare May 3, 2023 16:20
nolar referenced this pull request in nicolasaldecoa/sqeleton May 3, 2023
…port

Add support for column types: PostgreSQL JSON/JSONB and RedShift Super
@nolar nolar force-pushed the simplify-json-columns branch from 74edbcb to c2c5102 Compare May 5, 2023 10:51
@nolar nolar force-pushed the compare-bigquery-arrays-and-structs branch from dcc2d44 to 0a4619c Compare May 5, 2023 10:52
@dlawin dlawin marked this pull request as ready for review May 5, 2023 15:25
@nolar nolar force-pushed the simplify-json-columns branch from c2c5102 to 46c8867 Compare May 5, 2023 19:08
@nolar nolar force-pushed the compare-bigquery-arrays-and-structs branch from 0a4619c to fc19d8e Compare May 5, 2023 19:09
Base automatically changed from simplify-json-columns to master May 5, 2023 19:26
@nolar nolar force-pushed the compare-bigquery-arrays-and-structs branch from fc19d8e to c0d6570 Compare May 5, 2023 19:27
@nolar nolar force-pushed the compare-bigquery-arrays-and-structs branch from c0d6570 to 7c8d058 Compare May 5, 2023 19:43
@nolar nolar merged commit 40e24e0 into master May 5, 2023
@nolar nolar deleted the compare-bigquery-arrays-and-structs branch May 5, 2023 19:57
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants