在执行从FiRestore到存储桶的数据导出时,我遵循建议的解决方案:Schedule data exports.
从解决方案中挑选的一些代码如下所示:
const client = new firestore.v1.FirestoreAdminClient();
...
const projectId = process.env.GCP_PROJECT;
const databaseName = client.databasePath(projectId, '(default)');
return client.exportDocuments({
name: databaseName,
outputUriPrefix: bucket,
collectionIds: []
})
...
现在,对于第二代,我知道例如,可以使用预定义的参数从firebase-functions/params
中提取项目ID
但是,有没有一个新的FirestoreAdminClient
应该/可以用来处理databasePath()
和exportDocuments()
呢?