Write MQL with Gemini assistance
Stay organized with collections
Save and categorize content based on your preferences.
This document describes how you can use
Gemini Code Assist to get AI-powered
assistance in Cloud Firestore to generate MQL queries using natural language prompts.
To get the permissions that you need to complete the tasks in this document,
ask your administrator to grant you the
Gemini for Google Cloud User (roles/cloudaicompanion.user)
IAM role on the project.
Generate MQL queries using natural language prompts
You can give Gemini natural language comments (or prompts) to
generate queries that are based on your schema. For example, you can prompt
Gemini to generate MQL in response to the following prompts:
"How many popular books with publication year 1960?"
"Create a sample collection of popular books."
To generate MQL in Cloud Firestore with Gemini
assistance, follow these steps:
In the Google Cloud console, go to the Cloud FirestoreDatabases page.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-04-10 UTC."],[],[]]