[firestore-bigquery-export] Store change.before.data() somewhere
[READ] Step 1: Are you in the right place?
Yes
[REQUIRED] Step 2: Extension name
firestore-bigquery-export
What feature would you like to see?
Store data before and data after in the changelog, especially on DELETE operations.
How would you use it?
Right now on DELETE operations the data is null. Normally when looking at deletions int the changelog my first question is "what data got deleted?". This can be especially relevant in situations where the extension was installed on a large existing data set.
A second property, like beforeData: change.before.data() would be super useful. Here's the relevant code:
https://github.com/firebase/extensions/blob/a8848a2706839790749f16c5061d96ceb543a043/firestore-bigquery-export/functions/src/index.ts#L62
Thanks for the suggestion! Going to bring this up at the next meeting with Invertase next week.
Hey @samatcolumn, I wonder if querying the changelog table could serve your needs. The whole history of record changes is stored in the changelog table.
@yamankatby yeah the changelog has the data but it just means much more complex queries when looking at deletion events because the event with the deleted data is the one preceding the deletion.