Skip to content

Commit

Permalink
fix(firestore-bigquery-export): serialize timestamps for partitions f…
Browse files Browse the repository at this point in the history
…ield
  • Loading branch information
cabljac committed Nov 13, 2023
1 parent b278992 commit d878789
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 8 deletions.
4 changes: 4 additions & 0 deletions firestore-bigquery-export/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## Version 0.1.37

fix - serialize timestamps to date string

## Version 0.1.36

build - updated depenencies
Expand Down
2 changes: 1 addition & 1 deletion firestore-bigquery-export/extension.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# limitations under the License.

name: firestore-bigquery-export
version: 0.1.36
version: 0.1.37
specVersion: v1beta

displayName: Stream Firestore to BigQuery
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"url": "github.com/firebase/extensions.git",
"directory": "firestore-bigquery-export/firestore-bigquery-change-tracker"
},
"version": "1.1.27",
"version": "1.1.28",
"description": "Core change-tracker library for Cloud Firestore Collection BigQuery Exports",
"main": "./lib/index.js",
"scripts": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/

import * as admin from "firebase-admin";
import * as bigquery from "@google-cloud/bigquery";
import { DocumentReference } from "firebase-admin/firestore";
import * as traverse from "traverse";
Expand Down Expand Up @@ -155,6 +155,9 @@ export class FirestoreBigQueryEventHistoryTracker
if (property.constructor.name === DocumentReference.name) {
this.update(property.path);
}
if (property instanceof admin.firestore.Timestamp) {
this.update(property.toDate());
}
}
});

Expand Down
8 changes: 4 additions & 4 deletions firestore-bigquery-export/functions/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion firestore-bigquery-export/functions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"author": "Jan Wyszynski <[email protected]>",
"license": "Apache-2.0",
"dependencies": {
"@firebaseextensions/firestore-bigquery-change-tracker": "^1.1.27",
"@firebaseextensions/firestore-bigquery-change-tracker": "^1.1.28",
"@google-cloud/bigquery": "^4.7.0",
"@types/chai": "^4.1.6",
"@types/express-serve-static-core": "4.17.30",
Expand Down

0 comments on commit d878789

Please sign in to comment.