-
Notifications
You must be signed in to change notification settings - Fork 421
feat(firestore-bigquery-export): added JSON data type to the default bigquery schema #919
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
base: next
Are you sure you want to change the base?
Conversation
5502347
to
503ba1c
Compare
@dackers86 when is it planned to merge this PR? Sounds like a helpful addition 😍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work, but there are some missing pieces, especially the latest view won't work anymore when using the JSON
data type
fields: [ | ||
...defaultViewSchemaFields, | ||
{ | ||
name: "data", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The field path_params
should also be made a JSON object depending on the users selection.
schema.fields.push(documentPathParams); | ||
} | ||
|
||
const latestSnapshot = latestConsistentSnapshotView( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks IchordeDionysos. Now that the JSON updated is out of it's original |
I was able to make this work by using However, this removes most of the advantages of the JSON type! When querying the resulting View, the entire This is as opposed to I don't know enough about BigQuery to suggest an alternative strategy, but I really hope there is a way to have our cake and eat it too here. |
Moving this back to |
We manually changed the datatype of the changelog-table to JSON and had indeed to deal with the same group by issue. We fixed it in this way:
Don't know enough about the inner workings /performance impact of BQ but for us it works fine! |
1fad407
to
27370ce
Compare
c8885bd
to
d1481a2
Compare
Any updates on this? It would be very useful. |
32631be
to
bc45fb1
Compare
The BigQuery extension currently uses a
stringified
JSON object to store data when synching from Firestore. This PR prepares for when a JSON type becomes available.A new JSON datatype is currently in preview and can be tracked here https://cloud.google.com/bigquery/docs/reference/standard-sql/json-data
fixes: #1775