I would like to read the entire Firebase database into a variable from inside a backend Cloud Function, as follows:
exports.transformUserData = functions.https.onRequest((request, response) => {
admin.database().ref('/').on('value', function (snapshot) {
var dbData = snapshot.val();
...
});
...
});
Is this safe? (From a memory or dollar cost perspective, speed is not an issue in this case).
I expect the function will crash once my database grows due to an out-of-memory error. If this is the case, at what memory limit can we expect it to crash? (For example, 10MB).
Thank you in advance for any advice!