GoogleCloudPlatform / firebase-extensions

Apache License 2.0
74 stars 36 forks source link

[bigquery-firestore-export] import JSON strings as FS document #516

Open flyingcircle opened 3 months ago

flyingcircle commented 3 months ago

This feature request is for extension: bigquery-firestore-export

What feature would you like to see?

As firestore is organized into JSON-like documents, it would be nice for the data transfer to automatically convert JSON data into a document structure.

How would you use it?

I have a query in BigQuery that I'd like to import into FS that aggregates the data into shareable analytics to app users. So with my BQ query, I reformat it into

JSON_OBJECT(ARRAY_AGG(CAST(T AS STRING)), ARRAY_AGG(A))

I thought that the extension would automatically convert this JSON string into a FS document, but it just comes over as one large string. It would be nice to have some recursive data conversion to have the import be a bit more native to FS use cases.