> ## Documentation Index
> Fetch the complete documentation index at: https://docs.prequel.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Data types

> Understanding Prequel data types

## Understanding Prequel data types

Because data from any source can be synced to any destination, and because data types are not necessarily synonymous across data stores, a common mapping must be used to specify the source data type and predict the destination data type. As part of Prequel configuration, the expected data type must be defined ahead of time.

## Source type mapping

If you are configuring a source and need to decide what `PREQUEL` type to use, reference this table.

| Prequel Type | Supported                             | Athena                | BigQuery                              | Clickhouse                                                      | Databricks            | MongoDB          | MotherDuck                    | MySQL                                                                     | Postgres                                                                  | Oracle                           | Redshift                                                                  | Snowflake                                                         | SQL Server                                  |
| ------------ | ------------------------------------- | --------------------- | ------------------------------------- | --------------------------------------------------------------- | --------------------- | ---------------- | ----------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -------------------------------- | ------------------------------------------------------------------------- | ----------------------------------------------------------------- | ------------------------------------------- |
| `bytes`      | <Icon icon="check" color="#1FA85C" /> | binary                | bytes                                 | blob, mediumblob, longblob                                      | binary                | binData          | binary, blob                  | binary, varbinary, blob, mediumblob, longblob                             | bytea                                                                     | blob                             | VARBYTE, VARBINARY, BINARY VARYING                                        | binary, varbinary                                                 | binary, image, varbinary                    |
| `string`     | <Icon icon="check" color="#1FA85C" /> | char, varchar, string | string                                | string, fixedstring, text, mediumtext, longtext, varchar        | string                | String, ObjectId | text, varchar                 | string, char, text, longtext, varchar                                     | char, character, character varying, text, uuid, varchar                   | nchar, char, varchar2, nvarchar2 | CHAR, CHARACTER, NCHAR, BPCHAR, CHARACTER VARYING, NVARCHAR, TEXT         | CHAR, CHARACTER, NCHAR, BPCHAR, CHARACTER VARYING, NVARCHAR, TEXT | char, varchar, text, nvarchar, ntext, nchar |
| `boolean`    | <Icon icon="check" color="#1FA85C" /> | boolean               | bool                                  | bool, boolean                                                   | boolean               | Boolean          | boolean                       | boolean                                                                   | boolean                                                                   | number                           | boolean                                                                   | boolean                                                           | bit                                         |
| `integer`    | <Icon icon="check" color="#1FA85C" /> | smallint, integer     | N/A                                   | int, int8, int16, int32                                         | smallint, int         | Int32            | smallint, int                 | smallint, mediumint, int                                                  | smallint, integer                                                         | int                              | smallint, integer                                                         | smallint, integer                                                 | smallint, int                               |
| `bigint`     | <Icon icon="check" color="#1FA85C" /> | bigint                | int64, int, smallint, integer, bigint | int64, bigint                                                   | bigint                | Int64, Long      | bigint                        | bigint                                                                    | bigint                                                                    | bigint                           | bigint                                                                    | bigint                                                            | bigint                                      |
| `decimal`    | <Icon icon="check" color="#1FA85C" /> | decimal               | decimal, numeric                      | decimal, numeric                                                | decimal, dec, numeric | Decimal128       | decimal                       | decimal, numeric                                                          | decimal, numeric                                                          | decimal                          | decimal, numeric                                                          | decimal, numeric                                                  | decimal, numeric                            |
| `float`      | <Icon icon="check" color="#1FA85C" /> | real, float           | float64                               | float32, float64, double                                        | float, double         | Double           | float, double, float4, float8 | float, double                                                             | real, double precision                                                    | float, double                    | real, float4, float8, double precision                                    | real, float4, float8, double precision                            | float, real                                 |
| `timestamp`  | <Icon icon="check" color="#1FA85C" /> | timestamp             | timestamp                             | datetime, Datetime64                                            | timestamp             | Date, Timestamp  | timestamp, timestamptz        | timestamp                                                                 | timestamp, timestamptz                                                    | timestamp(n)                     | timestamp, timestamptz                                                    | timestamp, timestamp\_ntz, timestamp\_tz, timestamp\_ltz          | datetime2                                   |
| `date`       | <Icon icon="check" color="#1FA85C" /> | date                  | date                                  | date                                                            | date                  | N/A              | date                          | date                                                                      | date                                                                      | date                             | date                                                                      | date                                                              | date                                        |
| `json`       | <Icon icon="check" color="#1FA85C" /> | varchar, string       | json                                  | string\*                                                        | string                | Object           | json                          | json                                                                      | json, jsonb                                                               | nchar, char, varchar2, nvarchar2 | varchar(MAX)                                                              | varchar, variant                                                  | nvarchar(MAX)                               |
| `time`       | <Icon icon="check" color="#1FA85C" /> | time                  | time                                  | time                                                            | N/A                   | N/A              | time                          | N/A                                                                       | time                                                                      | N/A                              | time                                                                      | time                                                              | time                                        |
| `geography`  | <Icon icon="check" color="#1FA85C" /> | geometry              | geography                             | Point, Ring, Linestring, Multilinestring, Polygon, Multipolygon | N/A                   | geojson          | geometry                      | geometry, point, ring, linestring, multilinestring, polygon, multipolygon | geometry, point, ring, linestring, multilinestring, polygon, multipolygon | N/A                              | geometry, point, ring, linestring, multilinestring, polygon, multipolygon | geography, geometry                                               | geography, geometry                         |
| `vector`     | <Icon icon="check" color="#1FA85C" /> | `array<double>`       | `array<float64>`                      | Array(Float64)                                                  | `array<double>`       | array(float)     | double\[]                     | N/A                                                                       | double precision\[]                                                       | N/A                              | array(double precision)                                                   | array(double precision)                                           | N/A                                         |

<Note>
  **Scale and Precision limitations for decimal types**

  In order to support broad compatibility across destinations, `decimal` typed values must fit within the `DECIMAL(38,19)` scale and precision. `decimal` values transferred to BigQuery will be truncated to `DECIMAL(38,9)`, as this is the maximum supported size.
</Note>

<Warning>
  **Precision limitations for floating point types**

  Due to technical constraints, Prequel is unable to guarantee the absence of a loss of precision for any floating point (eg `float`) type. For use-cases in which precision is key, such as when transferring financial data, we **strongly recommend** leveraging fixed precision types instead such as `decimal`.
</Warning>

<Note>
  **Geography type is limited to World Geodetic System**

  Every geometric shape has a spatial reference system associated with it. The `geography` type is limited to geospatial data that corresponds to an SRID of `4326`, which represents spatial data using longitude and latitude coordinates on the Earth's surface as defined in the WGS84 standard.
</Note>

<Note>
  **Choosing between `array`, `json`, and `vector`**

  * The `vector` Prequel type is used when syncing float-valued arrays (e.g., ML embeddings).
  * For all other array-like data, including text arrays, integer arrays, mixed types, or nested structures convert to `json` upstream and use the `json` Prequel data type. `json` has broader destination support and is the safer default for arbitrary arrays.
</Note>

<Note>
  **Timestamps are synced as epoch values**

  All `timestamp` values are stored as a UTC epoch (microseconds since Unix epoch), regardless of the source timezone. The source timezone has no bearing on what reaches the destination. How the destination displays that epoch depends on the destination system's timezone configuration.

  **Athena Iceberg limitations**: For Iceberg tables, Athena has two timestamp restrictions:

  * **Type**: Athena only supports `timestamp` (without time zone) in DDL operations. If your Athena Iceberg source has columns typed as `timestamp with time zone`, cast them to `timestamp` in your source before syncing.
  * **Precision**: Athena Iceberg only supports millisecond precision (`timestamp(3)`). If your source has `timestamp(6)` columns, cast them to `timestamp(3)` in your source before syncing.
</Note>

\* An asterisk indicates partial support. Ask us about any specific data type limitations.

## Destination type mapping

If you are interested in what data type your recipient destination will receive, reference this table.

| Prequel Type | Supported                             | Athena          | BigQuery         | Clickhouse     | Databricks       | MongoDB      | MotherDuck    | MySQL     | Postgres            | Oracle       | Redshift          | Snowflake               | SQL Server           |
| ------------ | ------------------------------------- | --------------- | ---------------- | -------------- | ---------------- | ------------ | ------------- | --------- | ------------------- | ------------ | ----------------- | ----------------------- | -------------------- |
| `bytes`      | <Icon icon="check" color="#1FA85C" /> | string          | bytes            | blob           | binary           | binData      | blob          | binary    | bytea               | blob         | varbyte(16777216) | binary                  | blob                 |
| `string`     | <Icon icon="check" color="#1FA85C" /> | string          | string           | string         | string           | string       | text          | text      | text                | clob         | varchar(MAX)      | text                    | nvarchar(MAX)        |
| `boolean`    | <Icon icon="check" color="#1FA85C" /> | boolean         | bool             | boolean        | boolean          | boolean      | boolean       | boolean   | boolean             | number       | boolean           | boolean                 | bit                  |
| `integer`    | <Icon icon="check" color="#1FA85C" /> | integer         | int64            | integer        | int              | int          | smallint, int | int       | integer             | int          | bigint            | integer                 | int                  |
| `bigint`     | <Icon icon="check" color="#1FA85C" /> | bigint          | bigint           | bigint         | bigint           | long         | bigint        | bigint    | bigint              | bigint       | bigint            | bigint                  | bigint               |
| `decimal`    | <Icon icon="check" color="#1FA85C" /> | decimal         | decimal          | decimal        | decimal          | decimal128   | decimal       | decimal   | decimal             | decimal      | decimal           | decimal                 | decimal              |
| `float`      | <Icon icon="check" color="#1FA85C" /> | float           | float64          | double         | double           | double       | double        | double    | double precision    | double       | double precision  | double precision        | float                |
| `timestamp`  | <Icon icon="check" color="#1FA85C" /> | timestamp       | timestamp        | Datetime64     | timestamp        | date         | timestamptz   | timestamp | timestamptz         | timestamp(9) | timestamptz       | timestamp\_tz           | datetime2            |
| `date`       | <Icon icon="check" color="#1FA85C" /> | date            | date             | date           | date             | string       | date          | date      | date                | date         | date              | date                    | date                 |
| `json`       | <Icon icon="check" color="#1FA85C" /> | string          | json             | string\*       | string           | json         | json          | json      | jsonb               | clob         | varchar(MAX)      | variant                 | nvarchar(MAX)        |
| `time`       | <Icon icon="check" color="#1FA85C" /> | time            | time             | time           | time             | string       | time          | time      | time                | varchar2(8)  | varchar(MAX)      | time                    | time                 |
| `geography`  | <Icon icon="check" color="#1FA85C" /> | geometry        | geography        | string (wkt)   | string (geojson) | geojson      | geometry      | geometry  | geometry            | clob         | geometry          | geography               | geography            |
| `vector`     | <Icon icon="check" color="#1FA85C" /> | `array<double>` | `array<float64>` | Array(Float64) | `array<double>`  | array(float) | double\[]     | json      | double precision\[] | clob (json)  | super             | array(double precision) | nvarchar(MAX) (json) |

\* An asterisk indicates partial or incomplete support. Ask us about any specific data type limitations.

### Object storage Parquet types

Apache Parquet defines each column using a **Parquet type** (the physical storage format, such as INT64 or BYTE\_ARRAY) and optional type annotations: **convertedType** (legacy annotation) and **logicalType** (modern, richer metadata like TimestampType or DecimalType). Prequel selects these encodings to maximize compatibility across analytic engines (Athena, BigQuery, Spark, Trino, etc.) so your exported files load predictably without requiring engine-specific casts or configuration.

| Prequel type | Parquet type            | convertedType     | logicalType                                                                                              |
| ------------ | ----------------------- | ----------------- | -------------------------------------------------------------------------------------------------------- |
| `bytes`      | BYTE\_ARRAY             | NULL              | NULL                                                                                                     |
| `string`     | BYTE\_ARRAY             | UTF8              | NULL                                                                                                     |
| `boolean`    | BOOLEAN                 | NULL              | NULL                                                                                                     |
| `integer`    | INT64                   | INT\_64           | NULL                                                                                                     |
| `bigint`     | INT64                   | INT\_64           | NULL                                                                                                     |
| `decimal`    | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL           | DecimalType(precision=38, scale=19)                                                                      |
| `float`      | DOUBLE                  | NULL              | NULL                                                                                                     |
| `timestamp`  | INT64                   | TIMESTAMP\_MICROS | TimestampType(isAdjustedToUTC=1, unit=TimeUnit(MILLIS=`<null>`, MICROS=MicrosSeconds(), NANOS=`<null>`)) |
| `date`       | BYTE\_ARRAY             | UTF8              | NULL                                                                                                     |
| `json`       | BYTE\_ARRAY             | UTF8              | NULL                                                                                                     |
| `time`       | BYTE\_ARRAY             | UTF8              | NULL                                                                                                     |
