firebase / extensions

Source code for official Firebase extensions
https://firebase.google.com/products/extensions
Apache License 2.0
893 stars 383 forks source link

[firestore-bigquery-export] change datatype in changelog table from STRING to JSON #1775

Open basvandorst opened 1 year ago

basvandorst commented 1 year ago

What feature would you like to see?

Currently the data-field in the xxx_raw_changelog is of type STRING, but afaik this field always contains JSON data. Since BQ natively supports JSON datatypes it would be great to ship this plugin with a standard datatype JSON.

The old_data-field is also of type STRING, so I guess this should also be shipped by default as JSON.

Did some tests with this new datatype on the actual changelog table and it works seamlessly

Why?

Because it saves us a lot of money (don't have to query the full blob of data) and we want to make use of all native JSON_XX functions.

dackers86 commented 1 year ago

Thanks @basvandorst

We have a current open PR for this and will be hoping to continue the implementation soon.

https://github.com/firebase/extensions/pull/919