-
Notifications
You must be signed in to change notification settings - Fork 424
Description
Hi,
I'm trying to import a collection from firestore into the bigquery using the extension and I get
the following error "Error importing Collection to BigQuery: PartialFailureError". Can anybody help me please with some guidance on debugging?
Here is the log:
What is your Firebase project ID? ****-dev
? What is the path of the the Cloud Firestore Collection you would like to import from? (This may, or may not, be the same Collection for which you plan to mirror changes.) users
? What is the ID of the BigQuery dataset that you would like to use? (A dataset will be created if it doesn't already exist) firebase_export
? What is the identifying prefix of the BigQuery table that you would like to import to? (A table will be created if one doesn't already exist) main
? How many documents should the import stream into BigQuery at once? 300
Importing data from Cloud Firestore Collection: users, to BigQuery Dataset: firebase_export, Table: main_raw_changelog
Creating BigQuery dataset: firebase_export
Created BigQuery dataset: firebase_export
Creating BigQuery table: main_raw_changelog
Created BigQuery table: main_raw_changelog
Creating BigQuery view: main_raw_latest
Query:
-- Retrieves the latest document change events for all live documents.
-- timestamp: The Firestore timestamp at which the event took place.
-- operation: One of INSERT, UPDATE, DELETE, IMPORT.
-- event_id: The id of the event that triggered the cloud function mirrored the event.
-- data: A raw JSON payload of the current state of the document.
SELECT
document_name,
timestamp,
event_id,
operation,
data
FROM
(
SELECT
document_name,
FIRST_VALUE(timestamp) OVER(
PARTITION BY document_name
ORDER BY
timestamp DESC
) AS timestamp,
FIRST_VALUE(event_id) OVER(
PARTITION BY document_name
ORDER BY
timestamp DESC
) AS event_id,
FIRST_VALUE(operation) OVER(
PARTITION BY document_name
ORDER BY
timestamp DESC
) AS operation,
FIRST_VALUE(data) OVER(
PARTITION BY document_name
ORDER BY
timestamp DESC
) AS data,
FIRST_VALUE(operation) OVER(
PARTITION BY document_name
ORDER BY
timestamp DESC
) = "DELETE" AS is_deleted
FROM
parentiv-dev.firebase_export.main_raw_changelog
ORDER BY
document_name,
timestamp DESC
)
WHERE
NOT is_deleted
GROUP BY
document_name,
timestamp,
event_id,
operation,
data
Created BigQuery view: main_raw_latest
Inserting 50 row(s) of data into BigQuery
Error importing Collection to BigQuery: PartialFailureError