Admin access requires a @netrefer.com email address. All admin UI is under the Admin tab in the platform.
Environment variables
| Variable | Required | Description |
|---|---|---|
| DATABRICKS_SERVER_HOSTNAME | Yes | Databricks SQL warehouse hostname |
| DATABRICKS_HTTP_PATH | Yes | Databricks warehouse HTTP path |
| DATABRICKS_TOKEN | Yes | Databricks personal access token |
| B2C_CLIENT_ID | Yes | Azure B2C application (client) ID |
| B2C_TENANT_HOST | Yes | B2C login hostname (e.g. example.b2clogin.com) |
| B2C_TENANT_NAME | Yes | B2C tenant name |
| B2C_POLICY | Yes | B2C user flow policy name |
| B2C_REDIRECT_URI | Yes | OAuth redirect URI for the SPA |
| ANTHROPIC_API_KEY | No | Can be set here or via the AI settings UI |
| CONFIG_ENCRYPTION_KEY | No | Fernet key for encrypting stored secrets at rest. Generate: python -c "from cryptography.fernet import Fernet; print(Fernet.generate_key().decode())" |
| SQL_CONNECTION_STRING | No | SQL Server connection string. Falls back to local JSON file if unset. |
| CORS_ALLOW_ORIGINS | No | Comma-separated allowed origins. Default: http://localhost:6274 |
| PORT | No | Service port. Default: 8000 |
Table configuration
Adding tables
Tables in the Databricks gold_data schema with the ds_ prefix load automatically. To add tables from other schemas:
- Go to Admin > Tables > Explore layers to browse available schemas.
- Find the table you want to add.
- Click Add to platform.
Column configuration
For each table you can configure:
- Enabled columns β control which columns the AI uses. Disable PII or irrelevant columns.
- Column descriptions β plain-English descriptions. Click Auto-describe to generate with AI, then review and save.
- Aliases β map a column name to a business-friendly alias (e.g.
subscriber_guidβclient). - Cast overrides β override the data type shown to the AI.
Table descriptions
Add a plain-English description for each table. Click Auto-describe table to generate one, or write it manually.
Schema refresh
The schema is cached for 30 minutes. To force a refresh after adding a new column to Databricks, go to Admin > Schema > Refresh.
Glossary
The glossary maps business terms to SQL terms. The AI uses this when generating queries.
Examples:
revenueβsum(deposit_amount - withdrawal_amount)active playerβplayer who made a deposit or withdrawal in the last 30 daysFTDβfirst time depositor
Go to Admin > Glossary to add, edit, or delete terms. Click Recommend to have the AI suggest terms based on your table schemas.
Query examples
Verified examples show the AI exactly how to write certain queries (few-shot prompting).
To add an example: ask a question in chat, get a correct result, then click Save as example.
To manage examples: go to Admin > Query examples. Click Compact to merge similar examples and reduce prompt size.
AI model settings
Go to Admin > AI settings to configure:
- Provider β Anthropic (default) or OpenAI
- Model β which model to use for NLβSQL generation
- API key β enter here or set
ANTHROPIC_API_KEY/OPENAI_API_KEYenv var
Changes take effect immediately β no restart required.
Tool permissions
Go to Admin > Tool permissions to enable or disable individual tools per integration. For example, you can enable Confluence search but disable the Atlassian tool that creates Jira tickets.
Failed queries
The platform logs queries the user flagged as incorrect or that returned errors. Go to Admin > Failed queries to:
- Review β see the question, the SQL generated, and the error or user feedback.
- Correct β write the correct SQL. This automatically adds it as a query example.
- Dismiss β mark as not actionable.
- Generate training questions β create test questions from current table schemas.
Integration setup
Atlassian / Confluence (OAuth)
- Go to Admin > Integrations > Atlassian.
- Enter the Atlassian OAuth app credentials (Client ID, Client Secret).
- Set the Confluence base URL.
- Click Start OAuth β you will be redirected to Atlassian to authorise.
Token refresh is handled automatically. If the token expires, re-run the OAuth flow.
HubSpot
Two modes: Shared token (one HubSpot connection for all users) or Per-user token.
- Go to Admin > Integrations > HubSpot.
- Enter the HubSpot OAuth app credentials.
- Choose shared or per-user mode.
- Click Start OAuth to connect.
Azure Cost Tools
- Go to Admin > Integrations > Azure MCP.
- Enter: Azure tenant ID, Client ID, Client secret, MCP server URL (typically
http://localhost:3001), MCP app ID. - Save. Users can then connect their own Azure accounts via OAuth.
Coralogix
- Go to Admin > Integrations > Coralogix.
- Enter the Coralogix API key and endpoint URL.
- Save. Changes take effect immediately.
n8n workflows
- Go to Admin > n8n.
- Enter the n8n API URL and API key.
- Click Sync workflows to import the workflow list.
- Use Get workflow metadata to add display names and descriptions.
Config persistence
By default, all configuration is stored in a local JSON file (data/config.json). For shared/persistent config, set SQL_CONNECTION_STRING to a pyodbc-compatible connection string:
Driver={ODBC Driver 18 for SQL Server};Server=myserver.database.windows.net;Database=mcp_config;Uid=myuser;Pwd=mypass;Encrypt=yes;
If CONFIG_ENCRYPTION_KEY is set, all secrets stored in the config (API keys, OAuth tokens) are encrypted at rest using Fernet (AES-128-CBC). Set it in production.