Few months ago, Firebase published an Extension that allows exporting the documents in a Cloud Firestore collection to BigQuery, the serverless, highly scalable, enterprise data warehouse offered by Google Cloud.
Being able to export your Firestore data to BigQuery opens many possibilities in terms of data transformation, analysis, visualization, and reporting with business intelligence tools like Google Data Studio or QlikView. As a matter of fact, BigQuery supports a standard SQL dialect that is ANSI:2011 compliant.
Also very interesting, you can easily cross your Firestore data with other data sources, whether it is other Firestore databases, data sources in object…
In this article, I will demonstrate how you can quickly develop a web application that “OCRises” an image and translates the resulting text by mixing and matching different Firebase and Google Cloud services: Cloud Functions, Firebase Extensions and Vision API.
Also, I will show how the core business logic of such an app can be implemented in no more that 25 lines of code!
Not only will I share those 25 lines of code 😃 , but I am going to share the full source code of the web app shown below!
As illustrated in the above screenshots, the Travel…
With Cloud Firestore, we can combine multiple
where() methods to create logical
AND queries. These queries are called compound queries in the documentation.
However, as indicated in the documentation (Section “Query Limitations”):
Cloud Firestore does not support the following types of queries:
ORqueries. In this case, you should create a separate query for each
ORcondition and merge the query results in your app.
Firstly, let’s create a set of example data. Like the example in the documentation, we are going to create some Firestore records for a set of cities.
I’ve just answered an interesting question on Stack Overflow that we can summarized as follows:
As an example, let’s imagine we have two users groups,
group2 and three documents
doc3 can only be read by users of
doc2 can only be read by users of
So, how should…
Quite often in a application you need to aggregate data and order the results of this aggregation.
For example, let’s imagine a Restaurant Reviews App where you want to display the Top 3 restaurants in terms of number of reviews.
In the SQL world, this is quite easy to accomplish. For example, for the following two tables:
TL;DR: In this article we share and explain the code for building a module which allows Firebase end-users with a specific Admin role creating other users and assigning them other specific user roles. This solution can be applied to Web, Android, iOS and Flutter apps built with Firebase.
Most applications need to implement a role-based access control system.
Role-based access control is a method of restricting (and granting) application access based on assigned user permissions, which differ according to the user’s role.
Firebase offers all the necessary “mechanisms” to implement such a system.
On one hand we have Firebase Authentication…
As detailed in the Cloud Firestore documentation, data in Firestore is stored into documents, which are “organized into collections”. Documents can contain subcollections which, in turn, can contains documents.
The documentation also indicates that:
Documents in subcollections can contain subcollections as well, allowing you to further nest data. You can nest data up to 100 levels deep.
Normally, as a Firestore database architect, while working out your data model, you decide the ids of the different subcollections of a document.
For example, for a Restaurants Reviews application, you may decide to have a
reviews subcollection for each