Databricks Data Source Template

Prev Next

The Databricks data source template is the built-in template for Databricks data sources in Validatar 2026.1 and later. It reads a Unity Catalog catalog into the Validatar Catalog, maps Databricks data types, defines the standard profiles in Databricks SQL, and supplies nine macros for building tests.

Applies to: Validatar Cloud · Validatar Server · 2026.1 and later

To connect a workspace with it, see Connect to Databricks.

At a glance

Template name Databricks
Where to find it Settings > Data Source Templates
How you get it Built in. Validatar 2026.1 adds it to every instance during the upgrade.
Connection types Databricks Driver and Databricks Engine
Identifier delimiters Backticks: `schema`.`table`
Platform Databricks SQL warehouses with Unity Catalog

If your instance already had a template named Databricks before the upgrade, Validatar keeps that template and adds only the macros it is missing. Compare it with this page if your profiles or ingestion behave differently.

The Databricks data source template's Macros page listing its nine macros, from Table and Row Count to Column Metadata for a Table

Metadata ingestion

The template ingests one catalog: the one named in the connection's Database Name (or Database, for a Databricks Engine connection). It queries that catalog's information_schema:

Object Source What comes into the Catalog
Schemas information_schema.schemata Every schema except information_schema
Tables and views information_schema.tables, information_schema.views Schema, name, table or view, and the view definition
Columns information_schema.columns Data type, position, nullability, identity, maximum length, precision, scale, date and time precision, and the column comment
Primary keys information_schema.table_constraints, information_schema.key_column_usage Columns in a PRIMARY KEY constraint are marked as keys

The data type comes from FULL_DATA_TYPE with its parameters removed, so DECIMAL(18,2) ingests as DECIMAL and ARRAY<STRING> as ARRAY. Interval types ingest as interval.

Data type mappings

Validatar groups each Databricks type into one of its own types. Profiles and the Catalog use the group.

Validatar type Databricks types
Exact Numeric BIGINT, BYTE, DECIMAL, INT, LONG, SHORT, SMALLINT, TINYINT
Approximate Numeric DOUBLE, FLOAT
String STRING, VARCHAR
Date/Time DATE, TIMESTAMP, TIMESTAMP_NTZ
Boolean/Logical BOOLEAN
Geospatial GEOGRAPHY, GEOMETRY
Other ARRAY, BINARY, INTERVAL, MAP, NULL, OBJECT, STRUCT, VARIANT, VOID

Profiles

The template implements 41 of the standard data profiles in Databricks SQL. A 42nd, Total Data MB, is listed but turned off and has no script. Each profile runs only on the data types its definition allows:

Runs on Profiles
Tables Record Count, Column Count
Every column Null Count, Null Percent
Numeric, Boolean/Logical, Date/Time, GUID and String columns Distinct Count, Distinct Percent, Most Common Value, Most Common Count, Top 10 Values, Bottom 10 Values, Sample
Numeric columns Minimum (Numeric), Maximum (Numeric), Mean (Numeric), Median (Numeric), Lower Quartile, Upper Quartile, Standard Deviation, Zero Count, Zero Percent, Negative Count, Negative Percent, Binned (Numeric), Distribution (Numeric). Minimum, Maximum and Distribution (Numeric) also run on Boolean/Logical columns.
String columns Minimum (String), Maximum (String), Min Length, Max Length, Mean Length, Length Distribution, Longest Value, Shortest Value, Blank Count, Blank Percent, Numeric Count, Numeric Percent, Distribution (String). Distribution (String) also runs on GUID columns.
Date/Time columns Minimum (Date), Maximum (Date), Year Distribution, Year Month Distribution

Some profiles carry a condition, so they run only where the result means something:

Profile Runs when
Null Count, Null Percent The column is nullable
Length Distribution Max Length is above 0
Distribution (String), Distribution (Numeric) The column has 1 to 100 distinct values and is not unique
Top 10 Values The column is not unique
Bottom 10 Values The column is not unique and has more than 10 distinct values
Binned (Numeric) The column is not unique and has more than 100 distinct values
Sample Every value in the column is unique

A condition that reads another profile's value is checked for each column when the profile set runs (2026.1.1 and later), so a profile set that includes Distribution (String) profiles only the low-cardinality columns. Choose which profiles to run in a profile set: see Create and Run a Profile Set.

On a data source that uses a Databricks data processing engine, profile sets run inside Databricks and their results are stored in your Databricks account.

Macros

Macros are ready-made queries with dropdowns for the schema, table and column. They appear when you build a test on a Databricks data source.

Macro Returns You choose
Row Count The number of rows in a table Table
Row Count grouped by Column Row count per value of a column Table, column
Distinct Values in a Column Each distinct value of a column Table, column
Key Value List Distinct key and value pairs, ordered by key Table, key column, value column
Standard Profile of a Column Distinct count, minimum, maximum and null count for a column Table, column
Table Every row and column of a table Table
List of Tables Every table and view in the catalog Nothing
List of Tables in a Schema The tables and views in one schema Schema
Column Metadata for a Table Each column's type, position, nullability, key flag, sizes and comment Table

See Data Source Template Macros for how macros work in tests.

What you still set up

  • The data source and its connection: host, catalog, warehouse ID, service principal and secret. See Connect to Databricks.
  • The projects that can use the source, and a metadata refresh schedule.
  • Profile sets: which profiles to run, on which tables, and when.

Related