Can we write batch inside a transaction in google cloud functions to access documents stored in cloud firestore? I tried using two transactions in cloud functions.
Related
We’ve been trying to understand if Google Cloud can access data stored in Google Storage when using Google-managed encryption keys.
We want to understand if Google potentially has access to the data stored. If yes, is there a way to restrict such access?
Yes, Google can. No, you cannot restrict Google.
Google publishes data policy documents on its website on how/when/if they access your data. Data access is logged so that you can see such accesses. There is a process requiring approval. A Google employee cannot just poke around in your data. Similar to most legal documents, you must read the documents to understand the details and conditions.
Start with this privacy page:
Privacy Resource Center
I was trying to host a website on firebase and this keeps coming up enter image description here
If you want to initialize a Firebase project using the CLI (like you're doing), and you want to use Firestore or Storage, you first have to go into the Firebase admin console, click on Firestore and/or Storage, and select a location/region for your database/storage buckets. The error you're getting is that you're trying to set up Storage but you haven't yet set a Storage location for your buckets.
I am looking for examples/tutorials or an explanation of how I can use my app that has both Firebase Authentication and the Firestore cloud database. I think I understand how to setup offline persistence with the Firestore db, and I think that means that data will be persisted while my app is running and should connection be lost.
What if a user jumps on a a plane with zero connection and wants to run my app and is first presented with the login screen for Authentication. Can you point to an example or tutorial on the best way to setup this so that the app can still run from the beginning with no connectivity and then be able to authenticate and put the data in the Firestore cloud database when connectivity is gained?
Thank you.
According to the official Firebase documentation:
If your app uses Firebase Authentication, the Firebase Realtime
Database client persists the user's authentication token across app
restarts. If the auth token expires while your app is offline, the
client pauses write operations until your app re-authenticates the
user, otherwise the write operations might fail due to security rules.
EDIT:
You can achieve that with Cloud Firestore by enabling offline persistence:
Cloud Firestore supports offline data persistence. This feature caches
a copy of the Cloud Firestore data that your app is actively using, so
your app can access the data when the device is offline. You can
write, read, listen to, and query the cached data. When the device
comes back online, Cloud Firestore synchronizes any local changes made
by your app to the Cloud Firestore backend.
Note that you won't need to make any changes to the code that you use to access Cloud Firestore data.
Here you can see some examples for configuring the offline persistence.
I am trying to write a cloud function that receives a csv log from a python server, then posts it to either a Firestore Database collection or a storage bucket. I am a little lost on how to continue. Any suggestions?
I am using Firebase as a RESTful API, but I would like to create some endpoints that will return specific statistics about the data in the db to the user. For example, how many registered users in the system are from a certain country. Is that possible in Firebase or do I have to make my own custom backend to handle the generation of those statistics based on the data already stored in the Firebase database?