You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Firestore Native Mode导出数据能否导入BQ?导入遇错求助

Can BigQuery import data exported from Firestore Native Mode?

Short answer: Yes, it absolutely can—the Does not contain valid backup metadata error you're hitting comes from using the wrong URI format for Native Mode exports, mixing it up with the rules for Firestore Datastore Mode.

What's causing the error?

Firestore Native Mode and Datastore Mode have distinct naming conventions for their export metadata files:

  • For Datastore Mode, metadata files follow the pattern [KIND_COLLECTION_ID].export_metadata
  • For Native Mode, the metadata file is named default_namespace_kind_[COLLECTION_ID].export_metadata (e.g., if your collection is called Book, the file will be default_namespace_kind_Book.export_metadata)

When you tried importing, you probably either used the Datastore Mode URI pattern or didn't point directly to the correct Native Mode metadata file, which made BigQuery fail to recognize valid backup data.

How to fix this

Adjust your BigQuery import step to match Native Mode's requirements:

  • First, locate the correct metadata file in your Cloud Bucket—look for the one starting with default_namespace_kind_ followed by your collection ID, ending with .export_metadata
  • In BigQuery, when configuring the import, set the URI to the full path of this metadata file (e.g., gs://your-bucket/export-path/default_namespace_kind_Book.export_metadata)
  • Double-check that you've selected Cloud Firestore as the data source type (not Datastore) in the import settings

Quick checks to avoid future issues

  • Verify your export was done in Native Mode: Make sure you didn't switch to Datastore-compatible mode when exporting from Firestore
  • Confirm Bucket permissions: Ensure the BigQuery service account has read access to your Cloud Bucket, so it can pull the export files without permission blocks

内容的提问来源于stack exchange,提问作者Ayush

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.14 08:23:18