We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e100988 commit 96b6af6Copy full SHA for 96b6af6
firestore-bigquery-export/firestore-bigquery-change-tracker/src/bigquery/partitioning.ts
@@ -1,5 +1,5 @@
1
import { FirestoreBigQueryEventHistoryTrackerConfig } from ".";
2
-import { FirestoreDocumentChangeEvent } from "..";
+import { ChangeType, FirestoreDocumentChangeEvent } from "..";
3
import * as firebase from "firebase-admin";
4
5
import * as logs from "../logs";
@@ -199,7 +199,7 @@ export class Partitioning {
199
200
const firestoreFieldName = this.config.timePartitioningFirestoreField;
201
const fieldName = this.config.timePartitioningField;
202
- const fieldValue = event.data[firestoreFieldName];
+ const fieldValue = event.operation === ChangeType.DELETE ? event.oldData[firestoreFieldName] : event.data[firestoreFieldName];
203
204
if (!fieldName || !fieldValue) {
205
return {};
0 commit comments