Add a Data Source

What this covers
Each Tessallite project connects to exactly one data source. This article explains how to view or change the data source connection from the project Settings panel, describes the connection parameters for each supported source type, and lists common connection failure causes and remedies.
Steps
- Open the project from the workspace dashboard.
- Click the Settings tab at the top of the project page.
- Locate the Data Source section. The current source type and connection parameters are shown.
- To change the source type, select a new type from the Source type dropdown and fill in the parameters.
- Click Test Connection to verify.
- Click Save to apply the change.
Warning: Changing the source type after tables have been added to the model will invalidate all table references. You must remove all existing tables and re-add them from the new source before the model can be used.
Connection parameter reference
PostgreSQL
| Parameter | Required | Notes |
|---|---|---|
| Host | Yes | Hostname or IP of the PostgreSQL server. |
| Port | Yes | Default is 5432. |
| Database | Yes | The database name containing your schemas and tables. |
| User | Yes | Database user with SELECT access on the target schemas. |
| Password | Yes | Stored encrypted; never shown in plain text after saving. |
BigQuery
| Parameter | Required | Notes |
|---|---|---|
| Project ID | Yes | The GCP project ID that owns the BigQuery dataset (e.g. my-gcp-project). This is stored in the connection credentials and used to qualify table names as project_id.dataset.table_name. |
| Service account JSON | Yes | Full JSON key file. Account must have bigquery.dataViewer and bigquery.jobUser roles. For calendar auto-create, the account also needs bigquery.dataEditor. |
| Allow Tessallite to run DDL | No | Checkbox under connection settings. Required for calendar auto-create. Without it, you must run the DDL manually and bind the table. |
When adding a BigQuery source to a model, the Dataset field specifies which BigQuery dataset to expose. Tessallite uses the project ID from the connection credentials and the dataset from the source configuration to build fully qualified table references: project_id.dataset.table_name. Identifiers with hyphens (common in GCP project IDs like my-company-prod) are automatically backtick-quoted in generated SQL.
Amazon Redshift
| Parameter | Required | Notes |
|---|---|---|
| Host | Yes | Redshift cluster endpoint. |
| Port | Yes | Default is 5439. |
| Database | Yes | Redshift database name. |
| User | Yes | Redshift user with SELECT access. |
| Password | Yes | Stored encrypted; never shown in plain text after saving. |
Uses the same asyncpg driver as PostgreSQL (Redshift is wire-compatible). No additional installation required.
Snowflake
| Parameter | Required | Notes |
|---|---|---|
| Account | Yes | Snowflake account identifier (e.g. xy12345.us-east-1.aws). |
| Username | Yes | Snowflake user. |
| Password | Yes | Stored encrypted; never shown in plain text after saving. |
| Database | Yes | Snowflake database name. |
| Schema | No | Default schema. Defaults to PUBLIC. |
| Warehouse | Yes | Compute warehouse for query execution. |
| Role | No | Session role (optional). |
Requires snowflake-connector-python. See Supported Data Sources for installation instructions.
Databricks SQL Warehouse
| Parameter | Required | Notes |
|---|---|---|
| Server Hostname | Yes | Workspace host from the warehouse's connection details. |
| HTTP Path | Yes | Warehouse HTTP path from the same page. |
| Access Token | Yes | Personal access token or service principal token. Stored encrypted; never shown in plain text after saving. |
| Catalog | No | Unity Catalog catalog. Defaults to the warehouse default. |
| Default Schema | No | Default schema. Defaults to default. |
| Write access | No | Tick to build aggregates and calendars in Databricks; the token then needs CREATE TABLE and MODIFY on the target schema. |
See Supported Data Sources for permissions.
Hadoop / Spark Thrift Server
| Parameter | Required | Notes |
|---|---|---|
| Thrift Server host | Yes | Hostname or IP of the HiveServer2 or Spark Thrift Server endpoint. |
| Port | Yes | Default is 10000 for HiveServer2, 10001 for Spark Thrift Server. |
| Database | Yes | The Hive or Spark database (schema) name. |
SQL Server
| Parameter | Required | Notes |
|---|---|---|
| Host | Yes | Hostname or IP of the SQL Server instance. |
| Port | Yes | Default is 1433. |
| Database | Yes | SQL Server database name. |
| Username | Yes | SQL Server login. |
| Password | Yes | Stored encrypted; never shown in plain text after saving. |
| Schema | No | Default schema. Defaults to dbo. |
| ODBC Driver | No | Driver name. Defaults to ODBC Driver 17 for SQL Server. |
| Encrypt | No | Encrypt the connection to SQL Server using TLS. |
| Trust Server Certificate | No | Accept self-signed certificates (non-production only). |
Requires aioodbc and an ODBC driver installed on the host. See Supported Data Sources for driver installation instructions.
Measured behaviour
When you add a connection, test it, or add it to a model as a source, Tessallite checks how its database behaves by running a few small queries over fixed example values. These queries read no tables and scan no data. They check:
- Text: whether "East" and "east", "é" and "e", or "East " and "East" count as the same value, and the order text sorts in.
- Empty values: where empty (NULL) values sort, and whether empty text is stored as empty.
- Averages and rounding: what an average of whole numbers and of decimals returns, and how division and conversion to whole numbers round.
- Time zone: which day and month a late-evening UTC time falls in.
- Overflow: see Known limitations: data types and numbers on another connection.
The connection list shows when the check last ran, even when no differences were found, and warns about anything that differs from common defaults. For example, SQL Server ignores upper and lower case by default, so "East" and "east" are the same value there. Use Test (the play icon) after the database's settings or version change. Editing the connection's credentials, type or settings clears the measured behaviour until the connection is tested again.
Project administrators can use Test unmeasured connections in Manage Connections to check connections that have credentials but no recorded behaviour profile. The action tests them one at a time, continues after individual failures, and reports reachability separately from whether a behaviour profile was saved, including each failure reason. It runs only when an administrator requests it, never at startup or deployment. Until a profile is measured, queries that need unconfirmed behaviour, including some same-connection averages, are answered from the source.
Why it matters. An aggregate or pocket can be stored on a different connection from the model's source. That database then filters, groups, sorts and averages the stored rows. Tessallite lets it answer only the queries for which both connections were measured to behave the same; any other query is answered from the source, and the route reason names the difference.
Time zone (optional). PostgreSQL, Redshift, Spark and Snowflake connections have an optional Time zone field that takes an IANA name such as UTC or Europe/London. Every session Tessallite opens on the connection then runs in that zone. Leave it empty to use the database's own default. BigQuery and SQL Server cannot set a session time zone and do not offer the field. Generated SQL never names a time zone, so aggregates keep matching. An aggregate or pocket answers a monthly or daily roll-up of a time-zone-aware value only when its database and the source were measured to fall in the same day and month. Changing the field rebuilds the aggregates and pockets on that connection; test the connection afterwards to measure it again.
See Known limitations: data types and numbers on another connection for numeric precision and overflow.
Columns with their own collation. SQL Server and PostgreSQL let a single column compare text differently from the rest of the database. Adding or re-syncing a table records such a column's collation. A text query on that column is answered from the source whenever the aggregate or pocket is on another connection, because the connection check describes only the database default.
Pitfall. A connection that has not been checked counts as unknown, and unknown never matches. A connection created before this check existed, or one without credentials yet, needs a successful Test once.
What Test Connection checks
The test asks the gateway to authenticate against the source using the parameters you entered. It confirms:
- The host is reachable from the gateway's network.
- The port is open and the database service is listening.
- The credentials are accepted.
- For BigQuery: the service account JSON is valid and has sufficient permissions.
A successful test does not validate that specific schemas or tables exist.
Test Connection runs through the same query path as table discovery and profiling. Tessallite does not open your source database from the settings page itself.
Large catalogues and BigQuery profiling
The Sources panel lists up to about 500 tables (and about 50 BigQuery datasets). If your catalogue is larger, a banner explains that the list is incomplete — filter by schema to see the rest. The incomplete listing is a warning, not a table you can add to the model.
When you classify or profile a BigQuery table, Tessallite uses approximate distinct counts and the dataset __TABLES__ metadata for row counts. It does not run a billed COUNT(*) full table scan for that profile step.
Common connection failures
| Error | Likely cause | Remedy |
|---|---|---|
| Connection timed out | Host not reachable; firewall or VPC block. | Allow the gateway's outbound IP through the source's firewall rules. |
| Connection refused | Database service not running on specified port, or wrong port. | Verify port number and confirm the database service is running. |
| Authentication failed | Wrong credentials or expired service account key. | Re-enter credentials. For BigQuery, generate a new key in the GCP console. |
| Database does not exist | Misspelled database name or user lacks access. | Confirm the database name and access grant. |
| Permission denied | User can connect but lacks SELECT on target schema. | Grant SELECT on the relevant schemas and tables. |
Schema search and filter
The table list in the Sources panel includes a search field that filters tables and columns as you type. This is useful when your source has hundreds of tables and you need to find a specific one.
- Search by table name: Type part of the table name (e.g.
order) to show only tables whose names contain the search term. - Search by column name: The search also matches column names within tables. A table appears in the filtered list if any of its columns match the search term.
- Match count indicator: The count next to the search field shows how many tables match the current filter.
- Clear search: Click the X button or clear the text to return to the full table list.