Skip to main content

Workspaces

Overview​

The Workspace is a panel that opens alongside a Mantra conversation and holds the artifacts behind a Data Answer: the SQL Mantra generated and ran, and the Trust Score report. It gives you a persistent, inspectable view of that work, separate from the conversation but tied directly to it.

Most users only need the Insight in the conversation. The Workspace is for when you want to work with the SQL directly: modify it, run it, and save it as a Datamap.

Opening a Workspace​

You can open the Workspace in three ways:

  • Select View SQL below an Insight to open the Workspace at the SQL tab.
  • Select Trust Score below an Insight to open the Workspace at the Trust Score tab.
  • Select the Workspace button at the top of the conversation.

The Workspace has two tabs:

TabWhat it holds
SQLThe query Mantra generated and ran to produce the Insight, with two sub-views: Results (the raw data returned by the query) and Lineage (a visual rendering of the query for less technical users). Use the toolbar here to run, save, and view lineage.
Trust ScoreThe Trust Score report for the Data Answer, including Mantra's reasoning and the rules, tables, and columns it used. This tab is read-only. See Trust Score.

How a Workspace relates to the conversation​

Point-in-time binding. Each Workspace reflects the state of a Data Answer at the moment it was generated. Selecting an earlier answer in the conversation restores the Workspace to that state, including its SQL, lineage, and results.

Conversation-scoped. A Workspace has no life of its own. Its content always comes from the conversation that produced it. When you ask follow-up questions, Mantra sees your edited SQL and builds on it.

Editing and running queries​

Edit the SQL directly in the editor to add filters, adjust aggregations, or change join logic.

Select Run to execute the query and preview the results. A successful run syncs your edits so Mantra can use them in follow-up questions.

Query failures do not sync your changes

Your edits are synced when you run a query successfully, select Sync, or save a Datamap. A failed run does not sync your changes. Fix the SQL and run it again.

Sync status​

The Workspace header shows whether your current SQL is saved:

StatusMeaning
SyncedYour current SQL matches the saved state.
Manual changes detectedYou have local edits that haven't been synced. Select Sync to save without running, or run the query to sync automatically on success.
Syncing...A sync is in progress.
Sync failedThe sync attempt failed. Select Retry to try again.

Unsaved changes protection​

If you try to leave the Workspace (close it, switch conversations, or open a different Workspace) while you have unsynced edits, a confirmation dialog lets you Sync your edits first or Continue without Syncing to discard them.

Saving as a Datamap​

Once you're happy with the results, select Save in the toolbar to save the SQL as a Datamap. You can create a new Datamap, link to an existing one, or update one that's already linked.

Creating a new Datamap​

If the Workspace isn't linked to an existing Datamap:

  1. Select Save to open the Save dialog.
  2. Under Create New, type a name for your Datamap.
  3. Press Enter or select + to confirm the name.
  4. Select Create Datamap.

Linking to an existing Datamap​

  1. Select Save to open the Save dialog.
  2. Select a Datamap from the Existing Datamaps list.
  3. Optionally rename the Datamap.
  4. Select Update Datamap.

Updating a linked Datamap​

When the Workspace is already linked to a Datamap:

  1. Select Save to open the Update dialog.
  2. Optionally rename the Datamap.
  3. Select Update Datamap.
Datamap updates propagate to all linked Workspaces

If several Workspaces are linked to the same Datamap, updating the Datamap from any one of them updates the SQL in all the others.

Multiple Workspaces per conversation​

Each Data Answer in a conversation has its own Workspace. Select View SQL or Trust Score on any answer to switch to its Workspace.

  • Isolated changes: edits in one Workspace don't affect the others.
  • Separate Datamaps: save each Workspace as its own Datamap, or link several to the same one.
  • Agent context: when answering follow-up questions, Mantra builds on the most recent SQL in the conversation, not the Workspace you have open.

Troubleshooting​

Changes not persisting after a run​

Check the sync status. If it shows Sync failed, select Retry. If the run itself failed because of a query error, your edits are still local. Fix the SQL and run it again.