Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.wittify.ai/llms.txt

Use this file to discover all available pages before exploring further.

SQL Sources is the page that connects your project to live databases. Once a source is connected, the assistant can introspect the schema, write SQL against your tables, and render the result inline (as a table or a chart). All access is read-only, the assistant cannot modify your data.

Page anatomy

RegionWhat you see
Topbar breadcrumbChat with Your Documents / / SQL Sources.
Page headerTitle with a + New connection button on the end edge.
List bodyA grid of source cards.
Empty stateA dashed-border card with a Connect a SQL source button when the project has none.

SQL source cards

Each card summarises a connected database.
ElementWhat it shows
Card titleThe source name.
Tables count tables introspected.
Terms count terms in the semantic glossary.
Last refreshedA relative timestamp like 3h ago last refreshed or never refreshed.
Status chiplive in green, or stale in amber when the schema has not been refreshed in a while.
ClickOpens the source detail page.

Empty state

ElementWhat it says
TitleNo SQL sources yet.
BodyConnect a read-only database to let your agent answer questions from live data.
ButtonConnect a SQL source. Brand-gradient pill.

Connecting a new source

The new-connection dialog has a name field, a dialect dropdown, and a connection string input.
FieldNotes
Name requiredPlain-text input. Placeholder e.g. hr_prod. The dialog blocks save until the field has at least one non-whitespace character.
DialectDropdown with PostgreSQL, MySQL, SQL Server, BigQuery, Snowflake.
Connection string requiredPassword-style input. Placeholder postgresql://user:password@host:5432/dbname. Direction is left-to-right even in Arabic mode.
Connection noteA small one-line caption Read-only access only. The agent validates every query before running it.
Connect buttonBrand-gradient submit. The label flips to Connecting… with a spinner during the request.
Cancel buttonCloses the dialog.
For safety, the dialog rejects private IP ranges, cloud metadata endpoints, and localhost before submitting. Your connection details are stored encrypted and are never saved in your browser.

SQL source detail page

The detail page has four tabs: Schema, Semantic terms, Query history, and Connection.

Schema tab

The default tab. Shows what the assistant sees when it generates SQL.
ElementNotes
Filter tables searchFilters the table list by name.
Each table cardThe table name, PK badge for the primary key, FK badge for foreign keys, rows and columns counts, and a small expand caret.
Expanded tableA list of columns with the column name, the type, and any constraints.
Refresh schema buttonRe-introspects the database. The toast confirms Schema refreshed.
When the schema is empty, the empty state reads No tables introspected yet. Refresh the schema.

Semantic terms tab

Teaches the assistant Arabic ↔ English vocabulary for your schema.
ElementWhat it shows
SubtitleTeach the agent Arabic ↔ English vocabulary for your schema.
Add term buttonOpens the term editor.
Each term cardArabic term, English term, SQL expression, type chip.
Empty stateNo terms yet. Add your first term so the agent can map natural questions to SQL.
Each term has the following fields:
FieldNotes
Arabic termAt least one of Arabic or English is required.
English termAt least one of Arabic or English is required.
SQL expression requiredThe expression the assistant injects when it spots this term, for example COUNT(*) or employees.department_id.
TypeDropdown: Metric, Dimension, Filter, Table alias.
Save with Save term. Delete with Delete term, which confirms The agent will stop mapping this vocabulary to the SQL expression.
Semantic terms are how a user asking How many موظفين? gets the assistant to write SELECT COUNT(*) FROM employees. Build the glossary up front, every chat in this project benefits.

Query history tab

Reads Query history is coming soon. Every SQL the agent runs against this source will be audited here. The tab is intentionally empty today, the audit trail ships in a follow-up.

Connection tab

FieldNotes
DialectRead-only. The dialect picked when the source was created.
Connection stringRead-only and masked. Only an admin can rotate it (delete and reconnect).
ConnectedThe creation date.
Schema last refreshedTimestamp of the last refresh.
Delete this source buttonOpens a destructive confirmation.

Delete this source

ElementWhat it says
TitleDelete this SQL source?
BodyThis removes the connection and every semantic term. Chat sessions referencing this source will silently drop it on the next turn. This cannot be undone.
Cancel buttonCloses the dialog.
Delete buttonStyled with the destructive (red) background and white text.
After confirmation, the source disappears from the list. Chats that referenced it stop writing SQL against it on the next turn.

How a chat turn uses a SQL source

When you ask the assistant a data question that maps to SQL, the answer carries a SQL · {source name} tag and renders both the generated SQL (collapsible block) and the result (table or chart). Every SQL is validated server-side before running, with destructive operations rejected.

Common questions

The most common causes are private IPs (10.x, 172.16-31.x, 192.168.x), localhost (127.0.0.1 or localhost), or cloud-metadata endpoints (169.254.169.254). These are blocked to protect against server-side request forgery. Use a public hostname or a VPN gateway your account can reach.
Click Refresh schema at the top of the tab. The first introspection can take a moment for very large databases. After it lands, every table appears as a card.
Add a semantic term that maps the natural-language phrase to the right column. For example, an Arabic term العمر with SQL expression employees.age and type Dimension stops the assistant from inventing a column.
Click Refresh schema in the Schema tab. The assistant picks up the new shape on the next turn. Old SQL the assistant cached is rebuilt from the fresh schema.
No. Every query is read-only. Server-side validation rejects INSERT, UPDATE, DELETE, DROP, CREATE, and any other destructive operation. Sensitive columns can also be deny-listed.
The audit trail ships in a follow-up. Today, the tab carries the coming soon message. There is no temporary workaround for downloading history.
Yes. Each project owns its own SQL sources. Connect the database in each project with the credentials that project should use, the credentials are encrypted independently per source.
The status chip flips to stale when the schema has not been refreshed for a long time. Click into the source, then Refresh schema to flip it back to live.

Where to go next

Knowledge Bases

Pair SQL with document retrieval.

Chats

Start a conversation that uses this source.

Chat Canvas

Force tool to SQL only, or pick Auto per turn.

Project Settings

Retrieval features and danger zone.