question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

firestore-bigquery-export failing

See original GitHub issue
  • Extension name: firestore-bigquery-export

I have installed the Export Collections to BigQuery extension and it works fine however now I am attempting to import my existing data using firestore-bigquery-export by following the instructions here: https://github.com/firebase/extensions/blob/master/firestore-bigquery-export/guides/IMPORT_EXISTING_DOCUMENTS.md

However I am getting the error detailed below. Note: I get exactly the same error even if I enter a firebase projectid or collection that does not exist.

This may be an local environment issue, if so and this is not an appropriate place for this issue please let me know and close it.

$ node -v v12.13.0

$ npm -v 6.12.0

Steps to reproduce:

Run: npx @firebaseextensions/fs-bq-import-collection Enter the ${PROJECT_ID}, ${COLLECTION_PATH} and ${DATASET_ID} parameters as follows: my-fb-project-id, members, qmtbc_dev_export

Expected result

Collection imports successfully into BigQuery

Actual result

Error returned:

Importing data from Cloud Firestore Collection: members, to BigQuery Dataset: qmtbc_dev_export, Table: members_raw_changelog
Error unlinking journal file C:\Users\fullo\AppData\Roaming\npm-cache\_npx\10884\node_modules\@firebaseextensions\fs-bq-import-collection\lib/from-members-to-qmtbc-dev:qmtbc_dev_export:members_raw_changelog
after successful import: Error: ENOENT: no such file or directory, unlink 'C:\Users\fullo\AppData\Roaming\npm-cache\_npx\10884\node_modules\@firebaseextensions\fs-bq-import-collection\lib\from-members-to-qmtbc-dev:qmtbc_dev_export:members_raw_changelog'
---------------------------------------------------------
Finished importing 0 Firestore rows to BigQuery
---------------------------------------------------------
Error importing Collection to BigQuery: Error: EPERM: operation not permitted, unlink 'C:\Users\fullo\AppData\Roaming\npm-cache\_npx\10884\node_modules\@firebaseextensions\fs-bq-import-collection\node_modules\grpc\src\node\extension_binary\node-v64-win32-x64-unknown\grpc_node.node'

Also I looked at the script here: https://github.com/firebase/extensions/blob/master/firestore-bigquery-export/scripts/import/src/index.ts

And the error is being generated at line 187. It looks like it may throw this error if no data is found or if can’t access the project/collection.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:5
  • Comments:20 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
dackers86commented, Mar 15, 2021

Ok, in that case I’ll re-open for investigation.

1reaction
iDeliverAppscommented, Jun 30, 2020

I am still having this issue with Mac. No problem uploading schema files and having data populate against those, but I can’t get any other result for import than Error unlinking journal file '/Users/… … Error: ENOENT: no such file or directory, unlink '/Users/…

`? What is your Firebase project ID? ideliver-cloud
? 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 p
lan to mirror changes.) idriver-app\events\incoming
? 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) ideliver_app
? 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) incom
ing
? How many documents should the import stream into BigQuery at once? 300
Importing data from Cloud Firestore Collection: idriver-app\events\incoming, to BigQuery Dataset: ideliver_app, Table: incoming_raw_changelog
Error unlinking journal file /Users/tim/.npm/_npx/4672/lib/node_modules/@firebaseextensions/fs-bq-import-collection/lib/from-idriver-app\events\incoming-to-ideliver-cloud_ideliver_app_incoming_raw_changelog after successful import: Error: ENOENT: no such file or directory, unlink '/Users/tim/.npm/_npx/4672/lib/node_modules/@firebaseextensions/fs-bq-import-collection/lib/from-idriver-app\events\incoming-to-ideliver-cloud_ideliver_app_incoming_raw_changelog'
---------------------------------------------------------
Finished importing 0 Firestore rows to BigQuery
---------------------------------------------------------`

Any help would be greatly appreciated

Read more comments on GitHub >

github_iconTop Results From Across the Web

Loading data from Firestore exports | BigQuery - Google Cloud
The managed import and export service exports Firestore documents into a Cloud Storage bucket. You can then load the exported data into a...
Read more >
Export Firebase Crashlytics data to BigQuery
BigQuery exports contain raw crash data including device type, operating system, exceptions (Android apps) or errors (Apple apps), and Crashlytics logs, as well ......
Read more >
Unable to set up Export Collections to BigQuery extension ...
The following error message means that your FROM statement may not contain the proper query structure - project, database, and table:.
Read more >
Firestore Backup to BigQuery Import Not working
The problem appears to be that Firestore exports include an enumeration of document properties in the 'all_namespaces_kind_{COLLECTION_ID}.export_metadata' ...
Read more >
[GA4] BigQuery Export error messages - Firebase Help
You haven't been granted the necessary permissions for the Cloud project to which you want to export data. Remedy. Contact your Cloud administrator...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found