2

I just cleaned up my firestore collection data using DataPrep and verified the data via BigQuery. I now want to move the data back to Firestore. Is there a way to do this?

I have used manual method of exporting to JSON and then uploading using a code provided by AngularFirebase. But It is not automated as there is a need to periodically cleanup this data.

I am looking for a process within Google Cloud console. Any help will be appreciated

Glax
  • 21
  • 4

1 Answers1

0

This is not an answer, more like a partial answer. I could not add a comment as I don't have 50 reputation yet. I am in a similar boat but not entirely the same situation. My situation being that I want to use a subset of BigQuery data and add it to Firestore. My thinking is to do the following:

  1. Use the BigQuery API to query the data periodically using BigQuery Jobs' Load (in your case) or Query (in my case)
  2. Convert it to JSON in code
  3. Use batch commit in Firestore's API to update the firestore database

This is my idea and I am not sure whether this will work, but I will you know more once I am done with this. Unless someone else has better insights to help me and the person asking this question