Datasets and SQL
Turn raw synced data into named datasets that people and agents can rely on.
What a dataset is
A dataset is a saved SQL query over your synced data, stored as its own table and refreshed on the schedule you choose. Where the raw data is every invoice line from your accounting system, a dataset is the monthly revenue, with a description of what it counts.
Datasets are what agents work from. An approved dataset comes with its AI context and column notes, so an agent answers from a few documented rows instead of guessing at raw tables. Agents are offered approved datasets only, which decides what they work from. An agent can still read the raw synced tables its key covers through SQL. In the dashboard, admins and above create and approve datasets; members can read them. Anyone with a Read/write key can also have Claude create and approve datasets within that key's scope.
Three ways to make a dataset
- Ask Claude. Connected with a Read/write key, Claude creates and approves the dataset you describe, usually in under a minute. The
dataset-builderskill on the Skills page gives it a step by step procedure to follow. - Build it in Datasets. Go to Datasets in the sidebar and choose Create dataset. The steps are below.
- Save a query. In SQL, write a query, choose Run to check the result, then Save as... to keep it as a dataset or a draft.
Whichever you choose, the dataset catalog holds ready-made datasets for each source, to add as they are or to start from.
Create a dataset
Name and describe it
Fill in Dataset name and Description. The description is what people and agents see in the list of datasets, so say what the dataset contains in a sentence or two.
Say where it is stored
Target schema comes filled in; keep it. Target table is the name of the table the dataset is written to, in lowercase with underscores, such as monthly_revenue.
Define the data
Use the Visual builder tab to pick a table, columns and filters, or the SQL editor tab to write the query yourself. With several companies, a dataset can combine tables from any of the ones you have access to.
Choose how often it refreshes
Under Refresh schedule, choose Hourly, Daily or Weekly, or keep Manual refresh only.
Document it for AI
Open AI & MCP settings. Turn on Approved when the dataset is ready for agents, and write the AI context, the Column documentation and the Companies, as described below.
Create it
Choose Create dataset. It appears under Datasets marked Approved if you turned on Approved, or Not approved if you did not.
Writing for AI
Three things decide how well an agent uses a dataset:
- AI context: what the dataset contains, what it is for, and anything that would trip up a reader, such as whether amounts are signed or which currency they are in. Gatlas calls it the single highest-leverage field: every agent query and skill that touches the dataset starts with this text.
- Column documentation: one line per column on what it means, its unit and its edge cases. For example, that revenue is in USD, includes refunds and excludes tax.
- Companies: the company the dataset describes, your business or, with several, each one it covers. A key limited to certain companies only sees the datasets tagged with them.
Tip
Approval
A dataset is Approved, Not approved or a Draft. Agents read an approved one. A not approved one is built and hidden from agents. A draft is a query saved for later, and nothing is built from it.
To approve an existing dataset or take its approval away, open it under Datasets, switch Approved, then choose Save changes. An approved dataset is visible to every key whose scope includes it; see Agent access for how a key's scope is set.
SQL
SQL, under Library in the sidebar, is where you explore the synced data directly. Browse the tables your sources produced, write a query, choose Run to see the result, and export it as CSV. When a query is worth keeping, Save as... turns it into a dataset or a draft.
Verify a reverse sync webhook
How to check a signed reverse sync delivery is now under Automations.