[英]How to get all data from firestore to bigquery using extension
I am new to firebase and bigquery (and all gcp services) and am trying to use the extension inside of firebase that connects my firestore db to BigQuery.我是 firebase 和 bigquery(以及所有 gcp 服务)的新手,我正在尝试使用 firebase 内部的扩展,将我的 firestore 数据库连接到 BigQuery。 I seem to have set it up correctly, but it only shows data from the time I installed the extension going forward (no older data).我似乎已正确设置它,但它只显示从我安装扩展程序开始的数据(没有旧数据)。 I would like to see all old data and any new data in my firestore DB.我想在我的 firestore 数据库中查看所有旧数据和任何新数据。 How can this be done?如何才能做到这一点?
From the documentation of the Stream Collections to BigQuery extension:从Stream Collections 到 BigQuery扩展的文档:
If you create, update, delete, or import a document in the specified collection, this extension sends that update to BigQuery.如果您在指定集合中创建、更新、删除或导入文档,此扩展程序会将更新发送到 BigQuery。 You can then run queries on this mirrored dataset.然后,您可以对该镜像数据集运行查询。
So (as Doug commented too) it does not export the existing contents of the collection, but rather only streams the changes from the moment you install the extension.因此(正如 Doug 所评论的那样)它不会导出集合的现有内容,而只会从您安装扩展程序的那一刻起流式传输更改。
There's a section on backfilling your BigQuery dataset that says:有一个关于回填 BigQuery 数据集的部分说:
This extension only sends the content of documents that have been changed -- it does not export your full dataset of existing documents into BigQuery.此扩展仅发送已更改文档的内容——它不会将现有文档的完整数据集导出到 BigQuery。 So, to backfill your BigQuery dataset with all the documents in your collection, you can run the import script provided by this extension.因此,要使用集合中的所有文档回填 BigQuery 数据集,您可以运行此扩展程序提供的导入脚本。
Important: Run the import script over the entire collection after installing this extension, otherwise all writes to your database during the import might be lost.重要提示:安装此扩展后,对整个集合运行导入脚本,否则导入期间对数据库的所有写入都可能丢失。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.