- Reporting databases: your company’s Fluid data, such as orders, customers and products, plus data from Fluid Connect connectors. An admin turns these on in the admin.
- Mist app databases: the database behind each Mist app you build.
- Your own Postgres databases: any Postgres database you connect.
Before you start
- Reporting databases appear only after an admin turns them on, on the Databases screen in the admin. Your role must also be one of the roles listed there under Who has access.
- To see a Mist app’s production database, your role needs the same reporting-database access.
Open a database
In the sidebar, open the Code group and find Databases. Click a database to open the database viewer. The viewer has two tabs:- Browse: the tables in the database. Type in Filter tables… to find one, then click it to see its rows.
- SQL: write and run your own query.
Ask Mist about your data
In the chat, ask a question in plain words, such as “Which 10 products sold the most last month?”. Mist writes the query, runs it and shows the answer in the chat. Click Open in SQL editor to see and change the query Mist wrote. To build a live dashboard from your data, type/dashboard. See Slash commands.
When Mist queries a Mist app’s database for you, it uses the production database unless you ask for the local one.
Run your own query
1
Open the SQL tab
Open the database, then click SQL.
2
Write the query
Write a query that reads data, such as a
SELECT.3
Run it
Click Run, or press Cmd+Enter (Ctrl+Enter on Windows).
Connect your own Postgres database
1
Open the dialog
In the Code group, click + next to Databases. The Add Database Connection dialog opens.
2
Enter the details
Enter a Name, then the Host, Port, Database, User and Password. Turn on Require SSL if your database needs it.
3
Save it
Click Add Connection.
Limits
- Only read-only queries run:
SELECT,EXPLAINandSHOW. Any other query is rejected with Only read-only queries are allowed. - A query stops after 60 seconds.
- On a production database, avoid slow, expensive queries. They run against the live database.
Frequently asked questions
Why don't I see my company's Fluid data?
Why don't I see my company's Fluid data?
An admin has to turn on the Fluid database on the Databases screen, and your role has to be one that can query reporting databases. Ask an admin to check Who has access on that screen.
Why did a Mist app's production database disconnect on my other computer?
Why did a Mist app's production database disconnect on my other computer?
Mist gets you a personal sign-in for a Mist app’s production database. Each time Mist gets a new one, the previous one stops working, on every computer. When the sign-in on one computer stops working, Mist gets a new one the next time it connects there, which ends the sign-in on your other computer.
Can I talk with Mist by voice about a database?
Can I talk with Mist by voice about a database?
No. Voice conversations need a project folder on your computer, and databases don’t have one. You can still dictate a message. See Voice.