I was exploring option to load Firestore Native Mode data (collection and documents) into BQ. But its not working out for me.
Question: Does Big Query support import of extract from Firestore Native export?
Setup: 1 collection with multiple documents (no sub collections).
Steps: - Export to Cloud Bucket: https://firebase.google.com/docs/firestore/manage-data/export-import - Import in BQ: https://cloud.google.com/bigquery/docs/loading-data-cloud-firestore
Error While loading in BQ: 'Does not contain valid backup metadata'
Analysis: Its mentioned in the link that URI should have KIND_COLLECTION_ID and that file should end with [KIND_COLLECTION_ID].export_metadata. But none of these are true for Firestore Native mode export file. Its applicable for Firestore Datastore mode export.
- Verify [KIND_COLLECTION_ID] is specified in your Cloud Storage URI. If you specify the URI without [KIND_COLLECTION_ID], you receive the following error: does not contain valid backup metadata. (error code: invalid)
- The URI for your Cloud Firestore export file should end with [KIND_COLLECTION_ID].export_metadata. For example: default_namespace_kind_Book.export_metadata. In this example, Book is the collection ID, and default_namespace_kind_Book is the file name generated by Cloud Firestore