Table of Contents

Search

  1. Preface
  2. Introduction to Databricks Delta Connector
  3. Connections for Databricks Delta
  4. Mappings for Databricks Delta
  5. Migrating a mapping
  6. Databricks Delta SQL ELT optimization
  7. Data type reference

Databricks Delta Connector

Databricks Delta Connector

Databricks Delta and transformation data types

Databricks Delta and transformation data types

The following table compares the Databricks Delta native data type to the transformation data type:
Databricks Delta Data Type
Transformation Data Type
Range and Description
Array
1
Array
Unlimited number of characters.
Binary
Binary
1 to 104,857,600 bytes.
Bigint
Bigint
-9,223,372,036,854,775,808 to +9,223,372,036,854,775,807.
8-byte signed integer.
Boolean
Integer
1 or 0.
Date
Date/Time
Date and time values.
Decimal
Decimal
Exact numeric of selectable precision
For mappings: Max precision 28, scale 27.
For mappings in advanced mode: Max precision 38, scale 37.
Double
Double
Precision 15.
Float
Double
Precision 7.
Int
Integer
-2,147,483,648 to +2,147,483,647.
Map
1
Map
Unlimited number of characters.
Smallint
Integer
-32,768 to +32,767.
String
String
1 to 104,857,600 characters.
Struct
1
Struct
Unlimited number of characters.
Tinyint
Integer
-128 to 127
Timestamp
Date/Time
January 1,0001 00:00:00 to December 31,9999 23:59:59.997443.
Timestamp values only preserve results up to microsecond precision of six digits. The precision beyond six digits is discarded.
1
Applies only to mappings in advanced mode. Doesn't apply to Databricks cluster and
SQL ELT optimization
.

Rules and guidelines for data types

Databricks Delta has the following restriction for decimal data type:
The behavior of the decimal data type differs in mappings and mappings in advanced mode. Mappings support decimal max precision 28, while mappings in advanced mode supports max decimal precision of 38.
In mappings, if the decimal data type exceeds 28 precision in the source, the numeric value for the decimal is rounded off after the18th precision and the remaining digits are replaced with zeroes in the target.
For example, the value 1234567890123456789012345678.9012345678 from the source is rounded off to 1234567890123456900000000000 in the target.
However, in mappings in advanced mode, the decimal data from the source remains the same in the target.
To resolve the issue in mappings, specify a precision that is less than or equal to 28 for the Decimal data type in the source table.

0 COMMENTS

We’d like to hear from you!