MATIH Platform is in active MVP development. Documentation reflects current implementation status.
15. Workbench Architecture
Onboarding UI
Connection Setup

Connection Setup

The Connection Setup page guides users through configuring their first data source connection. It supports multiple database types, validates connectivity in real-time, and optionally scans the schema to prepare the AI Service for conversational queries against the connected data.


Supported Data Sources

Data SourceDriverDefault PortTLS Support
PostgreSQLasyncpg5432Yes
MySQLaiomysql3306Yes
SQL Serverpymssql1433Yes
Snowflakesnowflake-connector443Required
BigQuerygoogle-cloud-bigquery443Required
Databricksdatabricks-sql-connector443Required
Trinotrino8080Optional
ClickHouseclickhouse-driver8123Optional

Connection Form

The connection form (ConnectionSetupPage.tsx) adapts its fields based on the selected data source type:

Common Fields

FieldTypeRequiredDescription
Connection nameTextYesFriendly name for the connection
Data source typeDropdownYesDatabase engine selection
HostTextYesDatabase hostname or IP
PortNumberYesConnection port (pre-filled per type)
DatabaseTextYesDatabase name
UsernameTextYesAuthentication username
PasswordPasswordYesAuthentication password
SSL/TLSToggleNoEnable encrypted connection

Cloud-Specific Fields

Data SourceAdditional Fields
SnowflakeAccount, Warehouse, Role, Schema
BigQueryProject ID, Dataset, Service Account JSON
DatabricksWorkspace URL, HTTP Path, Token

Connection Testing

Real-time connection validation runs when the user clicks "Test Connection":

interface ConnectionTestResult {
  success: boolean;
  latency_ms: number;
  server_version: string;
  database_accessible: boolean;
  schemas_found: number;
  tables_found: number;
  error?: string;
}

Test Steps

StepCheckTimeout
1TCP connectivity5 seconds
2Authentication10 seconds
3Database access5 seconds
4Schema discovery15 seconds

Schema Scanning

After a successful connection, the user can optionally scan the schema:

Scan TypeDescriptionDuration
QuickTable and column names onlySeconds
StandardNames, types, and basic statisticsMinutes
FullComplete profiling with sample data5-15 minutes

Security

Connection credentials are handled securely:

Security MeasureImplementation
Credential storageEncrypted in Kubernetes Secrets
Transit encryptionTLS for all database connections
Password maskingPasswords never displayed after entry
Audit loggingConnection creation logged in audit trail

Error Handling

ErrorUser MessageSuggested Action
Connection refused"Unable to connect to the database server"Check hostname, port, and firewall
Authentication failed"Invalid username or password"Verify credentials
Database not found"Database does not exist"Check database name
SSL required"Server requires an encrypted connection"Enable TLS toggle
Timeout"Connection timed out"Check network connectivity

Skip Option

Users who do not have a database ready can skip this step and configure connections later through the Data Workbench settings. A sample dataset is available for users who want to explore the platform without their own data.