Store and query data in Firestore in Datastore mode

This page shows you how to store and query data in Firestore in Datastore mode using the Google Cloud console.

Before you begin

  • Sign in to your Google Cloud account. If you're new to Google Cloud, create an account to evaluate how our products perform in real-world scenarios. New customers also get $300 in free credits to run, test, and deploy workloads.
  • In the Google Cloud console, on the project selector page, select or create a Google Cloud project.

    Roles required to select or create a project

    • Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
    • Create a project: To create a project, you need the Project Creator role (roles/resourcemanager.projectCreator), which contains the resourcemanager.projects.create permission. Learn how to grant roles.

    Go to project selector

  • In the Google Cloud console, on the project selector page, select or create a Google Cloud project.

    Roles required to select or create a project

    • Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
    • Create a project: To create a project, you need the Project Creator role (roles/resourcemanager.projectCreator), which contains the resourcemanager.projects.create permission. Learn how to grant roles.

    Go to project selector

  • If you are not the project owner, your account requires the following permissions to complete this quickstart:

    • Your account requires the Datastore Owner role which contains the datastore.databases.create permission needed to create a Datastore mode instance.
    • Datastore mode requires an active App Engine application. If the project doesn't have an application, this quickstart creates one for you. In that case, you require the appengine.applications.create permission. The project owner can assign this permission with an IAM custom role.

Create a database

  1. To create a new database instance, open the Datastore section in the Google Cloud console:
    Go to the Datastore page