Celiq
v0.12Open app โ†—
Docs/Physical Layer/Dataset Mappings

Dataset Mappings

The wiring that connects a logical dataset to a specific physical table in a deployment โ€” and detects schema drift when the two diverge.

LuminaryUpdated June 2026 ยท 6 min read
โœฆ
In this section
Part of Celiq's semantic layer platform. Connect your warehouse, model your data once, query it everywhere.
๐Ÿ’ก
Tip
What it is: A dataset mapping says: "In deployment X, the orders dataset points to connection Y, table public.orders." It's the binding that resolves a logical dataset reference to a physical table at query time.
When to use it: When adding a new deployment, adding a new dataset, or when a physical table has been renamed or moved.
Where to find it: Lumen โ†’ Physical Layer โ†’ Datasets โ†’ [select dataset] โ†’ Mappings, or Lumen โ†’ Physical Layer โ†’ Deployments โ†’ [select deployment] โ†’ Dataset Mappings.
Who can use it: Luminary only.

A dataset mapping is the join between a dataset and a physical table, scoped to a deployment. Every dataset must have a mapping for every deployment that queries it โ€” otherwise queries will error.

Mapping schema

Each mapping has:

FieldDescription
deployment_idWhich deployment this mapping belongs to
dataset_idWhich logical dataset this mapping resolves
connection_idWhich warehouse connection to query through
physical_tableThe fully-qualified table name (e.g. public.orders, analytics.fact_orders)
database_overrideOptional: overrides the connection's default database
schema_overrideOptional: overrides the connection's default schema
compatibility_pct0โ€“100 score computed by comparing dataset columns vs. physical table columns
missing_columnsArray of column names in the dataset but not found in the physical table
extra_columnsArray of column names in the physical table not in the dataset definition
last_validated_atWhen this mapping was last introspected

Each (deployment_id, dataset_id) pair is unique โ€” one physical table per dataset per deployment.

Creating a mapping

1

Open the dataset

Go to Lumen โ†’ Physical Layer โ†’ Datasets and click the dataset you want to map.

2

Add a mapping

In the Mappings section, click Add Mapping.

3

Select deployment and connection

Choose the target deployment (e.g. Production) and the warehouse connection to use.

4

Specify the physical table

Type the fully-qualified table name. Use the format appropriate for your warehouse:

WarehouseFormat example
Postgres / Redshiftpublic.orders or schema.table
SnowflakeDATABASE.SCHEMA.TABLE or SCHEMA.TABLE
BigQuerydataset.table (project ID comes from the connection)
DuckDBschema.table or just table

5

Save and validate

Click Save Mapping. Celiq immediately introspects the physical table, compares its columns against the dataset definition, and computes a compatibility score.

Schema drift detection

When a mapping is created or validated, Celiq introspects the physical table and compares its columns to the dataset's column definitions:

compatibility_pct = (dataset columns found in physical table) / (total dataset columns) ร— 100
ScoreIndicatorMeaning
100%GreenAll dataset columns present in physical table
80โ€“99%OrangeSome columns missing โ€” queries using them will error
< 80%RedSignificant schema drift โ€” mapping likely stale

The UI shows a compatibility bar on each mapping card, with a red border on cards below 100%.

Missing vs. extra columns

  • Missing columns (missing_columns): In the dataset definition but not in the physical table. Queries that SELECT these columns will fail.
  • Extra columns (extra_columns): In the physical table but not in the dataset definition. These are ignored โ€” Celiq won't select them until you add them to the dataset.
๐Ÿ“
Note

Extra columns don't affect the compatibility score. Only missing columns (columns the semantic model expects but the warehouse doesn't have) reduce compatibility.

Validating a mapping

Validation re-introspects the physical table and recalculates the compatibility score:

Validate a single mapping: Open the dataset detail page, find the mapping card, and click Re-validate. Validate all mappings for a dataset: On the dataset detail page, click Validate All Mappings. Celiq introspects all physical tables in parallel and returns updated scores.

Run validation:

  • After schema changes in the warehouse (added or removed columns)
  • After pointing a mapping at a new physical table
  • As part of a periodic schema-health check

Using database and schema overrides

By default, Celiq uses the database and schema configured in the connection settings. Use overrides when a single connection serves multiple databases or schemas:

  • database_override: Celiq uses this database name instead of the connection's default
  • schema_override: Celiq uses this schema name instead of the connection's default

Example: A Snowflake connection defaults to database ANALYTICS. For your dev deployment, you want to use ANALYTICS_DEV instead. Set database_override = ANALYTICS_DEV on each mapping in the dev deployment.

What happens at query time

When Discover runs a query through a node that references dataset orders:

  1. Celiq looks up the active deployment (workspace default, or the Mosaic's pinned deployment)
  2. Finds the mapping for (active_deployment, orders_dataset_id)
  3. Retrieves connection_id and physical_table from the mapping
  4. Generates SQL against {physical_table} using the specified connection
  5. If no mapping exists, falls back to primary_connection_id + the original table

Deleting a mapping

Deleting a mapping is immediate. Any queries that run through nodes using that dataset in the affected deployment will fall back to primary_connection_id, or fail if no fallback exists.

Auditing mapping health

The Deployments list view shows a schema drift indicator for each deployment: the number of datasets with compatibility below 100%. Use this as a health dashboard for your Physical Layer.

For detailed analysis, open a specific deployment and scan the mapping cards for orange/red compatibility bars.