How to bulk edit documents via firestore console - firebase

I'm wondering if there is a way to bulk update documents in firestore via the Firestore console. I'm aware that I am able to do this via code, as shown in answers such as this one and this one, but I'm mainly looking for a way to do this via the Firestore console/UI.
At the moment, I am able to update one document at a time, but is there a way for me to update all documnts (matching a filter for example) at the same time to have the same update?:
I find that I often want to do this when I'm prototyping, and having to write code just to do a bulk update adds additional time to something I would think would be simple to do via the UI. I'm currently on the free spark plan, so I also can't use cloud-functions, meaning I have to spin up a server to do the bulk update via the admin SDK. Is there a way to bulk update documents via the firestore console or some other UI?

Currently Cloud firestore supports editing single documents via console. but not in bulk. The only way to edit documents in bulk is either using Batch writes or Transactions. If it is necessary for you to use console, you can raise feature request here

Related

How can I use local cache and only update changed documents using Firestore?

I'm working on a calendar app and I'm currently fetching the data from firestore to populate the calendar. Eventually, there will be a lot of data to be fetched and I'm trying to understand the caching system of Firestore but can't get behind it.
What I ideally want to achieve:
Always use cached data and only update those documents, which are new, edited or deleted.
How would I achieve that?
If you want to force the SDK to read from the cache, you can specify source options when calling get().
If you find yourself doing this everywhere though, it might make sense to consider using another database than Firestore as that is primarily an online, cloud-hosted database that continues to work while you're temporary offline.

Is there anyway to run Firebase realtime database queries with multiple keys?

I am working on a personal project to recreate the news feed of Facebook. So what I am trying to do is to recreate the scenario where when the user goes to the news feed, the user gets posts of everyone he follows only. Is there any way to run a query like that using the Firebase real-time database using an of "followings".
I can successfully generate single users posts in the android studio app using snapshot and recycler view.
If you're asking whether you can get posts from multiple userUID values with a single query, that is not possible.
If you're asking whether you can pass a list of postUID values to retrieve, that is also not possible.
In both cases the solution is to execute a separate query/read operation for each of the values, and merge the results in your application code. This is not nearly as slow as you may think, since Firebase pipelines the requests over a single web socket connection - which is quite efficient. For more on this, see Speed up fetching posts for my social network app by using query instead of observing a single event repeatedly

Combining Firebase Auth with Firebase Realtime Database or Google Cloud Datastore?

I'm planning a web application that requires user auth, plus the ability to display data for the users that is stored in a database. No interaction between the users is needed (yet), however the users should be able create objects and query their "own" objects. For example I list 10 book names (10 book objects), and User A should be able to pick a book and create a new object, call it userNoteObject that contains the name of a choosen book and a short note (that he/she writes).
With a basic pseudo code one book object would look like this:
bookObj = {"id": 1, "name": "book name"}
And the user's note object would be something like this:
userNoteObject = {
"id": 1,
"book_name": "random book name",
"owner_userid": "a1b2c3d",
"note": "some random string"
}
With MySQL I would create three tables, one for the users and one for the userNoteObject-s and another for the bookObj-s. Everytime an user saves a note, I would add it to the table that lists the saved notes. Then I can simply query the notes that belongs to X user based on the user's owner_userid. It's a quite simple functionality.
After reading about the possibilities I've made a decision to go with Firebase Auth (because in the future I might need Android and iOS compatibility) + Google Cloud Datastore or Firebase Realtime Database. However I'm a little bit scared about the Realtime Database of Firebase since I've never worked any DB like it. I also like to be able to modify records manually with something like PhpMyAdmin and I assume Cloud Datastore has a visual interface like that.
I'm familiar with JSON handling and creating JSON files, however the JSON based database is strange for me at the moment. Therefore I'm thinking about that maybe the other option would be a better choice. It's very important that I don't need realtime db features. I would load X number of entries into the table that holds the bookObj-s and sometimes update them. I assume when the user creates an userNoteObject it would be saved quickly with both and after deleting an userNoteObject I could refresh the page close to realtime with Datastore. But the table that holds the book objects must be able to store millions of entries easily.
So the important things:
One db table should be able to handle millions of records easily
Easy as possible querying
Visual interface for the DB (if it's possible)
I don't need realtime features like dynamic game score display/saving
Other info:
I would like to use Angular.js
I'm familiar with Python if it can help in something
So my question is that which database would be better for my needs? At the moment I say Datastore, but I'm totally new with these services so I'm not really against the Realtime Database, but Datastore looks more suitable since it has a visual interface. However I'm also not sure that how would work Datastore with Firebase. If there is a third option like combining both, Realtime Database for the objects save by the user and the static objects for Datastore for example, I would love to hear about it too. My overall goal is to be able to write and query the db easy and fast as it's possible and easily use it with Firebase auth.
UPDATE: I just discovered Firebase's Cloud Firestore, so if it can be more useful I could use it.
If you are going to use Firebase I would recommend you use Cloud Firestore instead of either Cloud Datastore or Firebase realtime database. You get the benefits of a real-time database plus a true document based JSON data store. The one downside is that you don`t have a UI to interact with the data. Datastore has one but its not as robust as say PHPMyAdmin. And since these are NoSQL datastores SQL support is pretty limited.
If you really want a true relational back-end you could try Cloud SQL which is basically MySQL running on Google Servers.
For the Firestore console/UI, see https://firebase.google.com/docs/firestore/using-console. Is that the kind of thing you're looking for?

Can I trigger creation of tables on Analytcs Export completion?

I have setup Analytics Export to BigQuery. Everytime when a new ga_sessions_yyyymmdd gets created I would like to run some queries aggregating some data for future use.
I can't figure out how to do this. Do I have to create a job and trigger it from outside or is there a way to trigger this in BigQuery directly (prefably using the Web UI).
You cannot schedule queries to run via the Web UI. You'll need to write a small piece of software to do this by using use the BigQuery API, and cron(s).
You may also want to check out Cloud Functions - bearing in mind that it's still in Alpha.

Monitor update and deletion in database using ASP.net

Am using grids in VB.net to display database records stored in Microsoft Access, the tables allow editing and deleting using the grid fields.
Is there a way I can monitor whenever a user deletes or edits a record? I want to be able to view details of every update or deletion to certain records, such as the date and users who did it.
What you're speaking of is known as "auditing" and certain databases - such as MS SQL Server - have built-in support for this. MS Access does not include this feature. With the abscence of auditing, a common way to implement this in a custom manner is using update triggers. Unfortunately MS Access also does not have triggers. The only way you'll be able to do this is via an API you write yourself to interact with your tables and discipline to stick to that API.
What you want to do is hook into the save commands on your inserts and deletes. You could also hook into the events to capture the data. Either way, create an insert statement that dumps the log data into your log database.

Resources