Data domains

A data domain is the business meaning of a column, such as Amount, Email or Date. Each domain carries the ClickHouse data type and the suggested default values behind that meaning, and picking a domain for a column fills the column's Data Type with that type.

Domains are chosen in the Data Domain cell of the Columns step, where a table's columns are configured: see Define table columns and Set up a table's columns. For the Writeback mapping, see Map columns and Data types for columns.

Choose a domain

  1. Open the Columns step of the table.
  2. Click the Data Domain cell of the column. It shows the domain the column has, or Select domain when none is set.
  3. The list opens grouped by category, and each domain shows its ClickHouse type next to its name. Type in Search domains… to narrow the list; the search looks at names, descriptions and types.
  4. Pick a domain. It fills Data Type with the domain's type and brings the suggested default values for the column.

Clicking outside the list closes it and clears the search box. When a search matches nothing, the list reads No domains found.

What picking a domain does

The domain catalogue

The list groups domains into six categories: Basic Types, Time Types, Identifiers, Specialized Types, Arrays and Complex Types and Custom. These tables show the domains, the ClickHouse type behind each one and what it is for.

Basic and time domains:

DomainStored asUse it for
TextStringFor general text data without length restrictions
ShortTextFixedString(50)For fixed-length text where 50 is the maximum length
CodeStringFor codes, symbols, identifiers (e.g., SWIFT, IBAN)
SingleCharacterFixedString(1)For single-character fields
NumberInt32For general integers (-2B to +2B)
SmallNumberInt16For small integers (-32K to +32K)
LargeNumberInt64For large integers
UnsignedNumberUInt32For positive integers
DecimalDecimal(18,2)For decimal numbers (standard precision)
AmountDecimal64(2)For monetary amounts, 2 digits after decimal
LargeAmountDecimal128(2)For very large monetary amounts
HighPrecisionAmountDecimal(18,6)For high-precision numeric data
PercentageDecimal(5,2)For percentage values (0.00% - 100.00%)
RateDecimal(10,6)For exchange rates and coefficients
ProbabilityDecimal(5,4)Probability values (0.0000 to 1.0000)
BooleanBoolFor true/false values
DateDate32Date only, without time
DateTimeDateTimeDate and time, second precision
PreciseDateTimeDateTime64(3)Date and time with millisecond precision
TimeDateTime64(0)Time. Will be stored in Datetime, but you can use time functions.
YearUInt16Year (e.g., 2025)
MonthUInt8Month number (1-12)
QuarterUInt8Quarter (1-4)
DateRangeTuple(Date, Date)Date range with start and end dates
DurationInt32Time duration in seconds

Identifier, specialized and complex domains:

DomainStored asUse it for
IDUInt32General ID fields
LargeIDUInt64Large ID fields
UUIDUUIDUniversal unique identifiers
ExternalIDStringIDs from external systems
EmailStringEmail addresses
URLStringWeb addresses
PhoneNumberStringPhone numbers
AddressStringPhysical addresses
GeoPointPointGeographic coordinates [latitude, longitude]
Longitude/LatitudeTuple(Float64, Float64)Geographic Longitude and Latitude Tuple
Latitude/LongitudeTuple(Float64, Float64)Geographic Latitude and Longitude Tuple
IPAddressIPv4IP addresses
JSONStringJSON format data
StatusLowCardinality(String)Status codes (Active, Inactive, Pending, etc.)
CurrencyLowCardinality(FixedString(3))Currency codes (USD, EUR, GEL)
CountryCodeLowCardinality(FixedString(3))Country ISO codes
DescriptionStringLong descriptive texts
HashStringHash values
TextListArray(String)Array of text strings
NumberListArray(Int32)Array of numbers
DateListArray(Date)Array of dates
KeyValuePairsMap(String, String)Simple key-value pairs

Custom is different: it carries no type of its own. The catalogue describes it as "You can choose ClickHouse datatype on your own", for when you want to set the type yourself.

Suggested default values

Every domain also comes with ready-made default values for the column. A few examples:

When the domain is locked

The domain cannot be changed on a locked row, or on a foreign key column (non-array): the list does not open there. For every lock in the grid and why a cell cannot be changed, see The table columns grid.

Questions, answered

Why is the domain choice locked on one of my columns?

Some rows keep their domain fixed. The list does not open on a locked row, or on a foreign key column (non-array), so the domain stays as it is.

What is the difference between Amount and LargeAmount?

Amount carries Decimal64(2), for monetary amounts with 2 digits after the decimal point. LargeAmount carries Decimal128(2), for very large monetary amounts. For finer precision, use HighPrecisionAmount (Decimal(18,6)).

Which domain should I pick for a date column?

Pick by what the column holds: Date (Date32) for a day, DateTime for date and time to the second, PreciseDateTime (DateTime64(3)) for milliseconds, and Time (DateTime64(0)) for a time of day.

What if none of the domains fits my column?

Pick Custom. It carries no type of its own, so you set the Data Type yourself.

Why does the list show no match for my search?

The search checks domain names, their descriptions and their types, so a word outside those may find nothing. The list reads No domains found; clear the box, or try a word from the meaning you want, such as date, text or email.

What default values does a domain suggest?

Each domain comes with a short list. Date offers today(), now() and yesterday(); UUID offers generateUUIDv4(); Currency offers 'USD', 'EUR' and 'N/A'. See Suggested default values above for more examples.

Can I change the domain later?

Yes. Open the Data Domain cell again and pick another one; it always shows the domain the column has. A locked row keeps its domain.

How do I know which ClickHouse type a domain uses?

Open the list: each domain shows its type next to its name, such as Decimal64(2) for Amount. The tables on this page list the type behind each domain.