Sidney
Sidney

Reputation: 4775

Importing data using Firebase Console would trigger too many Firebase Functions

I've run into a problem while trying to update the schema for my database. My plan was to export the data, use a local script to modify it, then import the modified data to overwrite the database.

The problem is Firebase console won't allow me to import the new data because it contains about 10,000 keys, each of which would trigger a Firebase Function (actually, a few functions), and I assume it's over some internal limit.

How would you modify a large number of paths like this?

My alternate ideas:

  1. Temporarily remove the Firebase Functions that this operation would trigger. I don't like this because (I assume) it removes the log/execution history for the functions
  2. Use firebase-admin to modify each path. This will use a lot of database bandwidth, and I believe it will trigger the functions anyway.

Upvotes: 0

Views: 735

Answers (1)

Frank van Puffelen
Frank van Puffelen

Reputation: 598926

There is no way to temporarily disable Cloud Functions, nor to tell to bypass triggering of Cloud Functions on a certain import or API call.

The only way to solve this would be to temporarily remove the function, import the data, and then re-enable the function.

This is a common use-case that would be great if it'd be supported in a more integrated way, so I'd recommend filing a feature request.

Upvotes: 2

Related Questions