AtScale Internal Data Types

The following table lists the AtScale internal data types and the corresponding external SQL data types supported by data warehouses.

The AtScale engine maps the SQL type to the AtScale internal type automatically. AtScale uses these internal data types during query planning and optimization. All types are nullable.

AtScale Data TypeDescriptionSQL Data Type/SQL Engine Support
INT32-bit signed integer (minimum value -2^31, maximum value 2^31-1)INT (all); INT64 (Google BigQuery)
LONG64-bit signed integer (minimum value -2^63, maximum value 2^63-1)INT64 (Google BigQuery)
FLOAT32-bit floating point (IEEE-754 single precision)FLOAT (all); FLOAT64 (Google BigQuery)
DOUBLE64-bit floating point (IEEE-754 double precision)DOUBLE (all) FLOAT64 (Google BigQuery)
DECIMAL(p,s)An arbitrary-precision decimal (subject to limits imposed by SQL engine)DECIMAL (all), NUMERIC (Google BigQuery, Snowflake)
STRINGZero or more UTF-8 characters, up to a limit of 2^31-1 characters (a lower limit may be imposed by the SQL engine, client or connector)STRING (all)
BOOLEANtrue or falseBOOLEAN (all)
DATETIMEUNIX-style timestampsDATETIME (Google BigQuery) TIME (Google BigQuery) TIMESTAMP (all)

Restrictions

The use of arbitrary precision numbers, aka "DECIMAL" types, with AtScale is subject to the restrictions listed below. Additionally, AtScale's DECIMAL support is limited by the capabilities of the connected data warehouse platform. If AtScale Technical Support determines that the underlying data platform has a DECIMAL calculation error, you will be referred to the appropriate vendor for resolution.

SQL Queries Only: When a query contains a mathematical expression that combines two Numeric/Decimal measures with different scales or precision values, AtScale delegates the Numeric / Decimal arithmetic behavior to the underlying data source rather than failing the query. If the data warehouse is changed, SQL results may vary slightly depending on the differences of the Numeric / Decimal behavior between the two data warehouses.

  • XMLA: XMLA restricts decimal-precision to four digits to the right of the decimal point. AtScale can only declare the XMLA decimal(p,s) type for values that meet that requirement. If the value exceeds four digits to the right of the decimal point, AtScale declares the data as an XMLA double type.
  • PostgreSQL: AtScale does not support the DECIMAL(p,s) type, aka NUMERIC(p,s), on the PostgreSQL database.
  • MAP Columns: AtScale does not support the DECIMAL(p,s) type for MAP type columns.
  • Google BigQuery: Only supports 38 digits of precision and 9 fractional digits. It uses data type name NUMERIC for the equivalent of DECIMAL(38,9).