Dataset
Mode Analytics report and SQL query datasets for AI training
A Mode Analytics dataset is an export of one company's Mode workspace: its reports, each made of SQL queries, an optional Python or R notebook and charts, kept in collections with their report runs, query runs, schedules and shared definitions. SourceX sources it to a buyer's spec from established businesses whose analysts run Mode, with stored run results included only where the underlying warehouse data is licensed too. Each dataset is de-identified and licensed for an agreed permitted use.
Dataset manifest
Sourced to your spec- What it is
- A Mode workspace's reports: query templates, the SQL each run executed, notebook code, chart settings and run history
- Typical systems
- Mode workspaces: the SQL Editor, Notebook, charts, Definitions, Datasets and scheduled report runs
- Typical history
- Specified by the buyer; depends on how long the workspace kept its report runs
- Modality
- Code in SQL, Liquid and Python or R; structured run metadata and result sets; text in report names and descriptions
- Delivery formats
- Agreed per order; JSONL per report with queries as .sql, notebooks as ordered cells and results as CSV or Parquet
- Preparation
- Literals in SQL and parameter values masked; analyst names replaced with keys; result sets de-identified or left out
- Licensing
- Rights reviewed for the analyses and, separately, for any result data; permitted use set in the license
- Availability
- Sourced to your spec by warehouse type, report count and run history; a matching workspace is not guaranteed
What a delivery contains
Fields vary by source system and are fixed per order. A typical delivery includes:
| Field | Type | What it holds |
|---|---|---|
| report_key | string | Stable pseudonym for a Report's token, with its name, description and created and edited dates. |
| collection | object | The Collection the Report is filed in, a space in the API, and whether it was shared or personal. |
| query_template | string | A Query's SQL as the analyst wrote it, with Liquid tags, parameter references and Definition references unrendered. |
| parameter_form | array | Parameters declared in the Query's Liquid form block: name, input type, default and the source of select options. |
| definitions_used | array | Definitions the Query references, each a saved SELECT statement shared across the workspace, with its SQL. |
| report_runs | array | Each Report run with its state, times, the parameter values it ran with and whether a Schedule or a person started it. |
| query_runs | array | The Query runs inside a Report run: the rendered SQL sent to the warehouse, state, error text and timing. |
| result_snapshot | object | Column names and row count of a Query run's stored result, with rows only where result data is licensed. |
| notebook_cells | array | The Report's Notebook in cell order: Python or R source, markdown, and which query results each cell reads from datasets. |
| charts | array | Charts and tables built on a Query: chart type, the result columns mapped to axes and series, and the title. |
| datasets_used | array | Mode Datasets the Report draws on, each a saved query result reused across Reports, with its own SQL. |
| schedules | array | Schedules on the Report: refresh frequency, the parameter values each scheduled run uses and its email subscribers, with addresses removed. |
Field names from the table above; values are masked placeholders.
Example record
{
"report_key": "rpt_5d0a91e2",
"name": "Weekly churned accounts by plan",
"collection": {
"name": "Growth analytics",
"type": "shared"
},
"query_template": "{% form %}\nplan:\n type: select\n default: all\n options: [all, starter, team]\n{% endform %}\n\nSELECT DATE_TRUNC('week', c.canceled_at) AS week, COUNT(*) AS churned\nFROM {{ @active_accounts }} AS a\nJOIN billing.cancellations AS c ON c.account_id = a.account_id\n{% if plan != 'all' %}\nWHERE a.plan = '{{ plan }}'\n{% endif %}\nGROUP BY 1",
"definitions_used": [
{
"name": "active_accounts",
"sql": "SELECT account_id, plan FROM core.accounts WHERE is_test = FALSE"
}
],
"report_runs": [
{
"run_key": "run_82a0",
"state": "succeeded",
"started_by": "member_k17",
"parameters": {
"plan": "team"
},
"query_runs": [
{
"query": "Churn by week",
"state": "succeeded",
"rendered_sql": "SELECT DATE_TRUNC('week', c.canceled_at) AS week, COUNT(*) AS churned\nFROM (SELECT account_id, plan FROM core.accounts WHERE is_test = FALSE) AS a\nJOIN billing.cancellations AS c ON c.account_id = a.account_id\nWHERE a.plan = 'team'\nGROUP BY 1",
"result_snapshot": {
"columns": [
"week",
"churned"
],
"row_count": 22
}
}
]
}
],
"notebook_cells": [
{
"n": 1,
"language": "python",
"source": "df = datasets['Churn by week']\ndf['avg4'] = df['churned'].rolling(4).mean()"
}
],
"charts": [
{
"type": "line",
"query": "Churn by week",
"x": "week",
"y": "churned"
}
]
}Synthetic record for illustration. Field names, structure and format are agreed per order.
What AI teams use it for
Train text-to-SQL on analyst queries
Every query has a name and sits in a titled report, so the SQL arrives with the analyst's own label for what it computes.
Teach parameterized query writing
Templates paired with their rendered runs show how one analysis is generalized into inputs, defaults and conditional clauses.
Model the SQL to Python handoff
Reports with a Notebook show which work analysts do in SQL and which they move to pandas or R.
Generate charts from query results
Chart settings mapped to result columns show which figure an analyst chose for which shape of data.
Build analysis evaluations
A stored result snapshot is the accepted output of a rendered query, so a model's query can be scored against it.
Use-case guides: Coding agents, Enterprise and computer-use agents, Private evaluation sets
What makes this data valuable
Template and rendered SQL linked
Each query run tied to the template and the parameter values that produced it.
Run history depth
Reports with many runs over time, scheduled and manual.
Notebooks present
Reports that carry Python or R work after the SQL, with outputs from an identifiable run.
Names and descriptions filled in
Report descriptions, query names and chart titles that say what was asked.
Shared logic included
Definitions and Datasets delivered with every report that references them.
Drafts flagged
Scheduled reports and shared collections marked apart from personal drafts.
Process
Mode Analytics dataset
One report binds the query, the code and the chart
In Mode the unit of work is the report. A report owns one or more named SQL queries. It may own a Notebook, in Python or R, and it owns the charts and tables its readers see. When the report runs, every query goes to the warehouse and the results are handed to the Notebook as a datasets object, which the code indexes by query name or position. Charts are built on a query's result columns. One object therefore holds an analysis end to end: the SQL that pulled the rows, the pandas or R code that reshaped them, and the figure a manager was shown. A warehouse query log holds only the first of those.
The links are by name, and some logic sits outside the report. A cell that reads the query named Churn by week breaks when the query is renamed, and a cell that reads by position depends on the order in which queries were added to the report, not the order shown. A Definition is a saved SELECT statement that any query can reference, and a Mode Dataset is a saved result that several reports build on, so a report is complete only when both come with it. The chart layer is configuration, not SQL: which column is the axis and which the series. An aggregation or pivot done in the chart builder appears in no query text, so a presented number may not be derivable from the SQL alone.
Mode keeps runs and overwrites definitions. Each report run is stored with its state, its parameter values and one query run per query. Editing a query changes the report's current text, and earlier wording survives mainly as the SQL recorded on past query runs, so run history is the nearest thing many reports have to version history. Collections were once called spaces, a word the API still uses, and personal collections hold the drafts.
The written template and the SQL that actually ran
A Mode query is a template, SQL with Liquid tags in it. A form block declares parameters, each with a type and a default, and the report shows them as inputs. In the body a parameter appears in double braces, if and for tags add or drop whole clauses, and a Definition is referenced by name with an at sign. None of this is valid SQL. At run time Mode renders the template with that run's parameter values and sends the result to the warehouse, and the query run keeps both, which Mode's API returns as raw_source and rendered_source. One template can have many executed forms, and they differ in structure, not only in a literal, when a branch added a join or a filter.
The template shows intent, but a SQL parser fails on it. The rendered form parses and can be re-run. Check on a sample that each Definition reference was replaced there by the Definition's own SQL, which is what makes the rendered form self-contained. Parameter values are spliced in as text, so a customer name a reader typed into a filter sits inside the SQL as a literal and has to be masked. A select parameter can also take its options from another query, so a list of account names may be stored as that query's result.
Stored run results are snapshots. They hold what the warehouse returned at that moment, and the same rendered SQL run today returns different rows wherever tables have since been updated or restated. A stored result is the only proof of what a reader saw. It is also a copy of warehouse data, often with customer rows in it. To test a sample, pick reports with parameters and compare each template with two of its rendered runs. Check each query run's limit setting, since a run made with the editor's row limit on stored a cut-off result, that failed query runs kept their error text, and that scheduled runs can be told from ones a person started.
What to check before licensing
- Have the workspace owner and counsel check Mode's terms of service and API terms, now under ThoughtSpot, on exporting report definitions, run history and results.
- Decide whether the license covers the analyses alone or also stored result sets, and have the owner confirm its rights to the warehouse data behind any results delivered.
- Check stored run results, Notebook cell outputs and chart previews for customer data, and confirm they were de-identified or left out.
- Confirm each query arrives as both the Liquid template and the rendered SQL of its runs, with literals and parameter values in the rendered SQL masked.
- Ask whether Definitions, Mode Datasets and the warehouse's table and column definitions were exported with the reports that depend on them.
- Ask which collections are in scope, and whether personal collections and archived reports are included.
- Ask how far back report runs are retained, whether results for old runs still exist, and whether the workspace was synced to a Git repository.
Delivery No files move before a signed license. A listing or a request grants no files by itself.
How licensing works through SourceX
- 1
Define
Send the domain, modality, volume, format, timeline and permitted use you need.
- 2
Source
SourceX identifies businesses that hold matching data and are open to licensing it.
- 3
Qualify
Fit, rights and quality are checked, and you review samples before committing.
- 4
License
Scope, permitted use, exclusivity, price and obligations are agreed in writing.
- 5
Deliver
Approved data is prepared, de-identified where required and transferred securely.
Questions Acquisition Partners ask
Are query results included, or only the SQL?
Either, depending on what the workspace owner can license. The SQL, notebooks, charts and run metadata are one scope. Stored results are a second, added only where the owner has rights to the underlying warehouse data. Result sets are copies of warehouse rows and often contain customer records, so they need their own rights review and de-identification. Say in your request which reports need results.
What is the difference between the template and the rendered SQL?
The template is what the analyst wrote, with Liquid parameters, conditional blocks and Definition references. The rendered SQL is what Mode sent to the warehouse for one run after filling those in. A rendered query parses and can be executed, but reflects one set of parameter values. Ask for both, linked by run.
Can queries be paired with the question they answered?
Partly. Mode gives each report a name and an optional description, each query a name and each chart a title, and these often state the question in a few words. Many reports have no description. Fuller pairing needs the request that prompted the report, which lives in a ticket or chat tool outside Mode.
Do we get the warehouse schema the queries ran against?
Not from Mode itself in a form to rely on. Mode connects to the company's warehouse and shows its tables in a schema browser, but the authoritative table and column definitions live in the warehouse. Specify a dated schema export for the tables the queries reference. Without it, queries can be read but not validated.
How are notebooks delivered, and do they re-run?
As ordered cells of Python or R source and markdown, with outputs where agreed. They do not re-run unaided, because each notebook reads its input from the report's query results, not from a file. To execute one you need the result snapshots for a run, or licensed data to regenerate them. Ask whether cell outputs match the run delivered.
Is SourceX affiliated with ThoughtSpot?
Mode is named to identify the system the records come from. That does not imply a partnership with or endorsement by ThoughtSpot. The records belong to the business that runs Mode, which licenses them under a signed agreement, and a request does not guarantee a matching dataset. Buyers should still confirm with counsel that the vendor's terms allow the intended use of exported data.
Related datasets
- SQL query logs paired with the business question
Analyst-run warehouse queries in session order, each with schema, run outcome and the paired business question
- Analysis notebooks with executed outputs
Internal analysis notebooks with code, markdown, saved outputs, charts and links to the request and the consumer of the result
- Charts, tables and figures with source data
Rendered charts, tables and figures paired with source values, the chart specification and the text that cites them
- Hex notebook projects and data apps
Project definitions with every cell's type, source and settings, the dependencies between cells, app layouts, components and saved versions
- Metabase questions and dashboards
Saved questions with titles, descriptions and queries, the models, dashboards and collections around them, revisions and an execution log; no query results
Evaluating this data for procurement?
Diligence packets are prepared per dataset. Rights, privacy processing and quality differ between datasets.
Request dataset diligenceTell us what your models need
Send your spec — domain, volume, format, timeline and permitted use — and SourceX will match it against partner data and come back with what can be licensed.
Updated 26 November 2026.