Lake data types

When the Lake imports a table's columns from a source, each source type is converted to a Lake type. Use this page to check what a column will become, and to read the types a table shows.

Where a column's type appears

Open a table's Columns step to see two type columns, described in full on Set up a table's columns:

Reading the grid needs View Lake Objects. See Who can do what in the Lake.

How conversion works

What source types become

The tables below list the common conversions, and the ones that surprise people most. Each source converts more type names than are shown. The connection form for these SQL sources is on Connect a SQL database, and the full source list is on Supported connectors.

SQL databases

SourceConversions
MSSQL, Azure SQL Databasetinyint → Int16; smallint → Int32; int → Int64; bigint → Int128; uniqueidentifier → UUID
Postgresserial → Int32; bigserial → Int64; boolean → UInt8; uuid → UUID; text[] → Array(String); integer[] → Array(Int32)
MySQL, MariaDBtinyint → Int8; int → Int32; bigint → Int64; set → Array(String); time → String; year → UInt16
Oraclenumber → Decimal; number(*,0) → Int64
Amazon Athenatinyint → Int8; smallint → Int16; int → Int32; bigint → Int64; boolean → Bool; timestamp → DateTime64; decimal → Decimal; arrays, maps and structs → String
ClickhouseTypes arrive as the source reports them; a FixedString column arrives as String.

Snowflake and Amazon Redshift

SourceConversions
SnowflakeEvery integer size (int, integer, bigint, smallint, tinyint) → Int64; datetime, timestamp, timestamp_ntz, timestamp_ltz and timestamp_tz → DateTime64(9), which keeps nine fractional digits; boolean → Bool; variant, object and array → String
Amazon Redshiftboolean, bool → UInt8; smallint → Int16; integer, int → Int32; bigint → Int64; timestamps → DateTime64

Google BigQuery

SourceConversions
Google BigQueryint64 → Int64; numeric → Decimal; bignumeric → String; bytes → String, kept as a hex string; bool → Bool; datetime, timestamp → DateTime64(6), six fractional digits; date → Date32; arrays, structs and records → String

Files and spreadsheets

SourceConversions
CSV, TSV, JSON, Parquet and similar file sourcesColumn types are read from the file itself, with the options on the Format step; Load all columns as String keeps every value exactly as written. See File formats and preview.
ExcelA column without a type of its own arrives as String.
Google SheetsEvery column arrives as String.

Schemaless and event sources

SourceConversions
MongoDBint32 → Int32; int64 → Int64; double → Float64; decimal128 → Decimal; boolean → UInt8; datetime → DateTime64; date → Date32; objectid → String; uuid → UUID; arrays and objects → String
FirestoreA whole number → Int64; a fractional number → Float64; text → String; true/false values → UInt8; a date and time → DateTime64; arrays and objects → String
Firebase Realtime DatabaseThe same kinds as Firestore. It has no date-and-time type of its own, so a stored timestamp arrives as a whole number.
RabbitMQThe columns you define carry the names and types you give them: string → String; int → Int64; float64 → Float64; boolean → UInt8; datetime → DateTime64; array, json and object → String. Columns you leave open are sampled from live messages at import. See Connect RabbitMQ.

Lake type names

A Lake column's type is written as a plain type name, such as Int64, String, Date32 or Bool, or in one of these forms when it carries a parameter or wraps another type:

FormWhat it holds
Decimal(P, S)A decimal number with a fixed precision and scale.
DateTime('Timezone')A date and time in a named timezone.
DateTime64(P)A date and time with fractional seconds; P keeps that many digits.
Array(T)A list of values of one type, such as Array(String).
Tuple(T1, T2, ...)A fixed set of values of different types, such as a point.
Nullable(T)A value that may be empty.
LowCardinality(T)A value drawn from a small set of distinct values.
Map(K, V)Pairs of a key and a value.

To set a column's type yourself, edit it on the Columns step; see Set up a table's columns.

Questions, answered

What type will my source column become in the Lake?

The source decides: each family has its own conversion list, shown above in What source types become. A source type with no conversion arrives as String.

Why did the same source type become a different Lake type on another source?

Each family converts on its own. tinyint is Int8 from MySQL, Int16 from MSSQL and Int64 from Snowflake, so read a conversion together with the source it came from.

Why did my small integer columns arrive as wider types?

That is the MSSQL conversion: tinyint becomes Int16, smallint becomes Int32, int becomes Int64 and bigint becomes Int128. Snowflake keeps every integer size at Int64 instead. The tables above show each conversion.

Why did my time column arrive as a String?

The Lake has no time-of-day type of its own, so a time column from MySQL, MSSQL, Postgres or Redshift arrives as String.

What does a MySQL set column become?

It arrives as Array(String), a list of text values.

Why do Snowflake timestamps keep more precision?

Snowflake timestamps arrive as DateTime64(9), which keeps nine fractional digits, so the values keep the precision Snowflake stores.

Why is my Redshift boolean a number?

Redshift boolean and bool columns arrive as UInt8, a small whole-number type, rather than a true/false type.

What does a Postgres array column become?

A list: text[] becomes Array(String), integer[] becomes Array(Int32), and the other common array types convert the same way, such as uuid[] to Array(UUID).

Why did my Excel columns arrive as String?

A column that carries no type of its own arrives as String.

Why are all my Google Sheets columns strings?

That is the conversion for this source: every Google Sheets column arrives as String.

What if my source type is not in the list?

The column arrives as String. Check Data Type after the import; if the column should hold numbers or dates, set its data domain to Custom and write the type you want. See Set up a table's columns.

Which types can a Lake column have?

Plain names such as Int64, String, Date32 or Bool, and the forms listed in Lake type names above: decimals with a precision and scale, datetimes with a timezone or fractional digits, arrays, tuples, nullable and low-cardinality wrappers, and maps.