Skip to content

Dataset

Retool app definition and query datasets for AI training

A Retool dataset is the set of internal tools a business built in Retool, exported as records: app definitions with their component trees, the SQL and API queries bound to those components, JavaScript transformers, modules, workflows with their run logs, and audit log events showing who ran which query. SourceX sources it to a buyer's spec from established businesses that run Retool, on Retool Cloud or self-hosted. Each dataset is de-identified, with resource credentials excluded and customer identifiers removed from query text and logs, and licensed for an agreed permitted use.

Dataset manifest

Sourced to your spec
What it is
App definitions with components, queries, transformers and event handlers, plus modules, workflows, workflow run logs and audit log events
Typical systems
Retool Cloud or self-hosted Retool, with Source Control, Modules, the Query Playground, Workflows, Retool Database and audit logs in scope
Typical history
Apps as they stand at export; earlier versions where releases or Source Control commits kept them; logs for the retained period
Modality
Toolscript or JSON app definitions, SQL and JavaScript query text, structured audit and run log events
Delivery formats
One directory per app in Toolscript or decoded JSON, queries as .sql and .js files, JSONL for audit events
Preparation
Resource credentials excluded; hard-coded tokens and customer identifiers in queries removed; audit log users pseudonymized
Licensing
Scoped per organization and app; agency-built and template apps checked for ownership; connected databases out of scope unless licensed separately
Availability
Sourced to your spec from businesses that run Retool; supply is not guaranteed
CodeIllustrative

What a delivery contains

Fields vary by source system and are fixed per order. A typical delivery includes:

FieldTypeWhat it holds
app_refstringPseudonymous ID of the App, with its name and the Folder it is filed in.
export_sourceobjectHow the App definition was obtained (Export to JSON, Export to Toolscript ZIP, Source Control or the storage database) and the Release it corresponds to.
component_treearrayEach Component's ID such as table1, its type such as Table or Button, its properties, and its container or the Module it belongs to.
bindingsarrayEvery {{ }} expression in a Component property or Query, with the component, query or global it references.
event_handlersarrayEvent handlers on Components and Queries: the event, the action such as trigger a query, and the target ID.
queriesarrayEach Query's ID, type (SQL, REST API, GraphQL or JavaScript), its Resource, and whether it runs on input change or only when triggered.
query_textobjectThe SQL statement, request path and body, or JavaScript of each Query, with {{ }} placeholders kept as written.
gui_writeobjectFor a SQL Query built in GUI mode: the table, the action type such as Bulk upsert via a primary key, the filter and the changeset.
transformersarrayJavaScript Transformers, both standalone ones and those attached to a Query's result.
resource_refarrayEach Resource's name, type such as PostgreSQL or REST API, and environment; hosts and credentials are excluded.
workflowobjectA Workflow's blocks in order (triggers, resource queries, code, branches, loops) and, where kept, each Workflow run's status and block logs.
audit_eventsarrayAudit log events for the App: action type such as QUERY_RUN, pseudonymous user, Query and Resource names, response time, timestamp and scrubbed metadata; IP addresses are removed.
retool_db_schemaarrayRetool Database tables the App reads: table and column names and types, with rows only where separately licensed.
Sample recordIllustrative

Field names from the table above; values are masked placeholders.

Example record

{
  "app_ref": "app_5c81f2",
  "app": "Refund Desk",
  "export_source": {
    "route": "source_control_toolscript",
    "release": "2.4.0"
  },
  "component_tree": [
    {
      "id": "orderSearch",
      "type": "TextInput"
    },
    {
      "id": "ordersTable",
      "type": "Table",
      "data": "{{ getOrders.data }}",
      "columns": [
        "order_id",
        "customer_ref",
        "total_cents",
        "status"
      ]
    },
    {
      "id": "refundButton",
      "type": "Button",
      "disabled": "{{ ordersTable.selectedRow.status === 'refunded' }}"
    }
  ],
  "event_handlers": [
    {
      "on": "refundButton",
      "event": "click",
      "action": "trigger",
      "target": "issueRefund"
    }
  ],
  "queries": [
    {
      "id": "getOrders",
      "type": "sql",
      "resource": "orders_replica",
      "runs": "on_input_change"
    },
    {
      "id": "issueRefund",
      "type": "sql",
      "mode": "gui",
      "resource": "orders_primary",
      "runs": "when_triggered",
      "confirm_before_running": true
    }
  ],
  "query_text": {
    "getOrders": "select order_id, customer_ref, total_cents, status\nfrom orders\nwhere order_number ilike {{ '%' + orderSearch.value + '%' }}"
  },
  "gui_write": {
    "query": "issueRefund",
    "table": "refunds",
    "action": "insert",
    "changeset": {
      "order_id": "{{ ordersTable.selectedRow.order_id }}",
      "issued_by": "{{ current_user.email }}"
    }
  },
  "resource_ref": [
    {
      "name": "orders_primary",
      "type": "postgresql",
      "environment": "production"
    }
  ],
  "audit_events": [
    {
      "action_type": "QUERY_RUN",
      "user": "user_0417",
      "query": "issueRefund",
      "resource": "orders_primary",
      "response_time_ms": 184,
      "t": "2024-05-14T15:21:09Z",
      "metadata": "[REMOVED]"
    }
  ]
}

Synthetic record for illustration. Field names, structure and format are agreed per order.

What AI teams use it for

Text to SQL with screen context

Each query comes with the screen it serves: the inputs, the statement and the table that shows the result.

Generating internal tools

An app pairs a layout of components with its queries and event handlers, the unit an app-building agent must produce.

Guarded write operations

Writes run only on a click, often behind a confirmation, showing how operators protect business data.

Back-office automation

Workflows show scheduled and webhook jobs as ordered blocks of queries and code.

Evaluation sets

An app with one query removed makes a test item, scored against the query the builder wrote.

Use-case guides: Coding agents, Enterprise and computer-use agents, Private evaluation sets

What makes this data valuable

Named queries and components

IDs such as getOpenInvoices and approveButton, not query14 and button9.

Writes delivered in both forms

SQL-mode statements as text and GUI-mode writes as structured actions.

Source Control history

Apps synced to Git come with commits and review, not one current state.

Bindings resolve

Every expression points at a component, query or module in the delivery.

Audit log joins

Query and app names in audit events match the IDs in the definitions.

Production use

Audit events show people other than the builder running the queries.

System export

Retool dataset

This page covers retool internal app definitions and queries.Illustrative

Every query is written against the state of the screen

A Retool app is a set of named objects that refer to each other through JavaScript expressions in double curly braces. A Table component's data property is {{ getOrders.data }}. The SQL in getOrders filters on {{ orderSearch.value }}. A Button's event handler triggers issueRefund, whose values include {{ ordersTable.selectedRow.order_id }} and {{ current_user.email }}. Only those expressions and event handlers connect them, so an app's data flow has to be recovered by parsing every expression and resolving its IDs. Once that is done, each app pairs a screen an operations person works in with the exact statement each control sends to a database or an API.

Retool converts SQL queries into prepared statements unless that is turned off on the resource, so the text is a parameterized template, and an expression generally cannot stand in for a table or column name. Read queries normally run by themselves when an input changes, while writes run only when triggered and can ask for confirmation first. And writes are often not SQL text at all. In GUI mode the builder picks a table, an action type such as Update an existing record or Bulk upsert via a primary key, a filter and a changeset of keys and values, and the definition stores those choices in place of a statement. A corpus that keeps only SQL strings drops many of the writes.

A transformer is JavaScript that reshapes a query's result before components read it, and SQL results arrive by default as an object of column arrays, which is why formatDataAsArray appears in so many apps. A module is a reusable group of components and queries with declared inputs and outputs, and a query imported from the Query Playground follows the shared query's latest version unless pinned, so check that both arrive with the apps. IDs default to names such as table1 and query7, which say little about intent.

The export holds the logic and none of the rows

A resource is a saved connection to a database or an API, with host and credentials held by the organization, and a query only names its resource. An exported app therefore carries the component tree and the query text but not the data, the credentials or the schema of the tables it reads. The only traces of that schema are column names in the SQL, column settings saved on Table components and keys in changesets. Retool Database is the exception: a hosted PostgreSQL whose tables live inside the organization.

The route decides the format. An app's menu offers Export to JSON and Export to Toolscript ZIP. The JSON file holds its app state as one serialized string, and it has to be decoded before components and queries can be listed. Toolscript is also what Source Control commits to Git for a protected app: main.rsx and other .rsx files for the component tree, functions.rsx for queries, and query SQL and JavaScript extracted into files under a lib folder. That route brings commits, the app's real edit history, though older repositories may hold the earlier YAML format. On self-hosted Retool the PostgreSQL storage database holds the apps, and audit events sit in its audit_trail_events table.

What the apps did survives only in logs. Audit log events record who ran which query in which app against which resource, with the user's IP address and the response time, and a query run's detail can show the exact query and the parameters passed, which is where customer emails and account numbers appear. Parameters can be hidden from the log query by query, so coverage varies. Credentials should not be in an export, but check: a REST query can carry an Authorization header typed into it, and a JavaScript query can hold a token in a string. To test a sample, decode one app, resolve every expression to an ID, count queries by type, resource and mode, and join audit events to query names.

What to check before licensing

  • Have the data owner and your counsel check Retool's terms on exported app definitions, audit data and API use, for Retool Cloud or self-hosted as applies.
  • Confirm no connection strings or resource credentials are in the delivery, and scan REST query headers and JavaScript queries for hard-coded tokens.
  • Search query text for literal customer identifiers, such as an account ID pasted into a WHERE clause while debugging.
  • Ask whether audit log events are included, for what period, and how parameter values, user emails and IP addresses in them were handled.
  • Ask which export route was used (Export to JSON, Toolscript ZIP, Source Control or the storage database), whether the JSON was decoded, and that no file is a debug export, which embeds query outputs.
  • Check that Modules and Query Playground queries the apps reference are in the delivery, and that every {{ }} expression resolves.
  • Confirm in writing that rows from connected databases and Retool Database are out of scope, or covered by their own rights review.

Delivery No files move before a signed license. A listing or a request grants no files by itself.

How licensing works through SourceX

  1. 1

    Define

    Send the domain, modality, volume, format, timeline and permitted use you need.

  2. 2

    Source

    SourceX identifies businesses that hold matching data and are open to licensing it.

  3. 3

    Qualify

    Fit, rights and quality are checked, and you review samples before committing.

  4. 4

    License

    Scope, permitted use, exclusivity, price and obligations are agreed in writing.

  5. 5

    Deliver

    Approved data is prepared, de-identified where required and transferred securely.

Questions Acquisition Partners ask

What does a Retool dataset contain?

It contains the definitions of a business's internal tools. Each app is a tree of components, the SQL, API and JavaScript queries bound to them, transformers and event handlers. Modules, workflows and audit log events can be added. It does not contain the business data the apps read. You specify the apps you need, and supply is not guaranteed.

Does it include the data the apps displayed?

No. Retool connects to databases and APIs through resources and stores the query, not the result. An export carries query text and component settings, without rows, credentials or table schemas. Retool Database tables are the one place rows live inside the organization. If you need data to run the queries against, specify it as a separate dataset from the connected system.

Are the SQL queries delivered as runnable SQL?

Partly. Queries written in SQL mode are text with {{ }} placeholders that Retool sends as bound parameters, so they run once the placeholders are filled and a matching schema exists. Writes built in GUI mode are stored as a table, an action type, a filter and a changeset, not as a statement. Ask for both forms.

Can I get the history of how an app changed?

Only where the business kept it. An app export is one state. Apps under Source Control have a Git history of commits in Toolscript, and inside the product Retool keeps numbered releases and a History of saved changes with their author and date. Ask which of these exist for the apps you want.

What do the audit logs add?

They add the record of use. An audit log event names a user, an action type such as QUERY_RUN, the app, the query and the resource, so it shows which queries people actually ran. Events can also carry parameter values, user emails and IP addresses, so they need the most de-identification. Ask what period the logs cover.

Is SourceX affiliated with Retool, Inc.?

Retool is named to identify the system the records come from. That does not imply a partnership with or endorsement by Retool, Inc. The records belong to the business that runs Retool, 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.

Evaluating this data for procurement?

Diligence packets are prepared per dataset. Rights, privacy processing and quality differ between datasets.

Request dataset diligence

Tell 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.

See if your company qualifies