Skip to main content
With Analytics, the agent turns a question into a SQL query, runs it on the tables you selected, and answers from the results. Use it for questions about numbers, counts, and trends, where search falls short because it only reads the passages it finds. For questions about text, like policies or notes, use search instead.

When to use table queries

Take this table of cars: “What is the most common color for cars produced between 2000 and 2010?” is a good fit for a table query. “What is the best car to buy if I live in New York?” is a better fit for search, because the answer is in the descriptions.

Where tables come from

  • Folders: upload a CSV or Excel (.xlsx) file as a table, or create tables with the API (Upsert a table).
  • Connections: Dust creates tables from Google Sheets (each tab becomes a table), Microsoft Excel files, Notion databases, Salesforce, Snowflake, and BigQuery.
Each Google Sheets tab can have up to 512 columns. See the Google Drive size limitations for the other limits on Google Sheets. You don’t need this setup for CSV or Excel files uploaded in a conversation: the agent analyzes them in the conversation. See Conversation files.

Set up table queries

1

Add knowledge

In the Agent Builder, in Capabilities and knowledge, click Add knowledge.
2

Select tables

Pick a Space and select one or more tables. Select a whole spreadsheet to add all of its tabs. Click Next.
3

Choose Analytics

Pick Analytics (tables, spreadsheets…), describe what the tables contain, and save the agent.
The agent uses the tables selected when you save it. When you select a spreadsheet or a folder, Dust adds the tabs or tables directly inside it at that moment. Tables in nested subfolders aren’t included. If you add tabs or tables later, edit the agent, select them, and save.

Describe your tables

A clear description helps the agent write better queries. For a table like this one: A good description would be: “Extract from our CRM. Each row is a potential customer, with the date of our last meeting and their stage in the sales pipeline.” For BigQuery, you can reuse the table and column descriptions set in BigQuery. Turn this on in the BigQuery connection settings.

Join tables

An agent can use several tables at once and join them, even when they come from different data sources. Select all the tables when you set up the knowledge, then explain in the instructions how they relate. For example, with a users table (name, email) and an orders table (product_name, user_email), add this to the instructions:
This matters most when the right join columns aren’t obvious from their names.

Knowledge

Compare the ways an agent can use your data.

Search data sources

Search text documents by meaning.

Folders

Upload CSV files and create tables.

Upsert a table

Create and update tables with the API.