Dashboard quick start

This quick start tutorial shows you how to use the dashboard to start learning the Fauna Query Language (FQL). It takes you through the first steps of logging in to the Dashboard Shell, creating and viewing a database, and submitting an FQL query.

Before you start, view the browser requirements.

Step 1: Register or log in to your account

Go to https://dashboard.fauna.com/register, enter your Email and Password, and click the SIGN UP button.

Dashboard quick start

If you already have an account, choose Sign in, enter your Email and Password, and click the SIGN IN button.

Step 2: Create a database

Create a database and populate it with demo data.

  1. On the Home page, click the CREATE DATABASE button:

    Dashboard quick start

  2. Enter a database Name. The name must match the following regular expression but can’t be a single underscore: [a-zA-Z_][a-zA-Z0-9_]*.

    Next,

    • Choose a Region Group.

    • Select Enable Static Typing.

    • Select Use demo data.

    • Disable Backups.

       

      Dashboard quick start

       

  3. Click the CREATE button.

Your database is now available and populated with demo data.

Step 2: Browse the database

This introductory exercise shows you how to open a database in the UI, view collections, which are equivalent to tables in a traditional database, and view documents in the collection.

  1. To view the database created in the preceding step, select Explorer, which opens the database Dashboard Shell window:

    Dashboard quick start

  2. In the Explorer window, expand the Region Group you chose in the preceding step and click your database name to view the database contents:

    Dashboard quick start

  3. The bottom of the Explorer window shows the database Collections, user-defined Functions, Roles, and Access Providers entities, which are populated from demo data.

    Click Collections to view the collections:

    Dashboard quick start

    To see other actions you can apply to a collection, hover over the collection name in the list and click the hamburger menu to the right.

    You can click the + symbol to the right of the database name if you want to create another Collection.

  4. List Documents and Indexes in a Collection.

    Click the Customer collection in the collection list to display the list of documents for that collection:

    Dashboard quick start

    Click the Indexes tab to list the indexes defined for the collection.

  5. View a Document in the Collection.

    In the document list, click the first document:

    Dashboard quick start

    The document contents returned by an FQL query are displayed in the edit window on the right. You can edit the document and click the SAVE button to save the updated document to the database.

    For any entity, you can click the + to the right to create another entity.

In the same way, you can view, create, and change user-defined Functions, Roles, and Access Providers by selecting the feature in the lower Explorer panel menu bar.

Step 3: Submit an FQL query

This step shows you how to use the Dashboard to manually construct and submit an FQL query.

You can enter FQL queries in the SHELL window on the right from the previous step.

Close any tabs you created, except the left-most database tab, and click the Clear shell icon on the right to refresh the edit window. Click the TYPECHECK button to enable type checking if needed:

Dashboard quick start

This basic example creates a Collection but you can submit any FQL query to become more familiar with the Dashboard and the Fauna Query Language.

If you get an error response, the error message indicates the likely cause of the error, usually a typo. Clear the SHELL window, fix the query, and try again.

  1. Copy this query and paste it into your SHELL window to create a Collection named Hello:

    Collection.create({ name: "Hello" })
  2. Enter ctrl + Enter or click the right arrow button in the lower left to submit the request:

    Dashboard quick start

    You should see output similar to the following:

    {
      name: "Hello",
      coll: Collection,
      ts: Time("2023-05-30T17:32:24.655Z"),
      indexes: {},
      constraints: []
    }

    Try other FQL API methods to discover more Fauna features.

Next steps

In this quick start, you’ve learned how to use the Dashboard to browse a database and add entities to the database. To go deeper into the capabilities of FQL, continue with the FQL basics cookbook, using the Dashboard to get hands-on experience making FQL queries.

Is this article helpful? 

Tell Fauna how the article can be improved:
Visit Fauna's forums or email docs@fauna.com

Thank you for your feedback!