Mapping columns in Snowflake as a Source
Overview
This document outlines the mapping of Snowflake data types to Data Integration data types. It also defines the behavior for handling unsupported data types in various scenarios.
Data type mapping
The following table describes the mapping of Snowflake data types to their corresponding Data Integration data types:
| Snowflake as a Source data type | Data Integration data type |
|---|---|
| NUMBER (up to 9 decimal places) | SHORTDECIMAL |
| NUMBER (more than 9 decimal places) | LONGDECIMAL |
| FLOAT | FLOAT |
| BOOLEAN | BOOLEAN |
| DATE | DATE |
| TIME | TIME |
| TIMESTAMP | TIMESTAMP |
| VARCHAR | VARCHAR |
| BINARY | VARCHAR |
| VARIANT | VARCHAR |
| OBJECT | VARCHAR |
| ARRAY | VARCHAR |
Expected behavior for unsupported data types
-
Multi-Table metadata:
- When returning metadata for tables in a multi-table query, map the data type to the closest available datatype in Data Integration. If no close match is found, use STRING.
-
Custom queries:
- For unsupported data types encountered in custom queries, map them to the closest available datatype in Data Integration. If no close match is available, use STRING.
-
Failure handling:
- Data Integration should not fail due to unsupported data types. The system should handle these gracefully according to the mapping rules.
-
Manual mapping changes:
- If a user manually changes the mapping to an unsupported datatype in the target, Data Integration should fail with a clear and appropriate error message.