Snowflake Columns Mapping
  • 2 Minutes to read
  • Dark
    Light
  • PDF

Snowflake Columns Mapping

  • Dark
    Light
  • PDF

Article Summary

Type Mapping

We match Snowflake data types to Rivery data types while extracting your data. If a data type is not supported, we will map it as a String type.

The following table shows the mapping of Snowflake data types to Rivery-compatible types:

Snowflake TypeRivery Type
VARCHARSTRING
INTNUMBER
BIGINTNUMBER
SMALLINTNUMBER
TIMESTAMPTIMESTAMP
DATETIMESTAMP
INTEGERNUMBER
NUMBERNUMBER
DATETIMETIMESTAMP
SMALLINTSMALLINT
BOOLEANBOOLEAN
FLOATFLOAT
BOOLBOOLEAN
ARRAYSTRING
OBJECTVARIANT
TIMETIME
TIMESTAMP_LTZTIMESTAMP
TIMESTAMP_NTZTIMESTAMP
TIMESTAMP_TZTIMESTAMP
STRINGSTRING
DECIMALNUMBER
TEXTSTRING
NUMERICFLOAT
DOUBLEFLOAT
DOUBLE PRECISIONFLOAT
REALFLOAT
RECORDVARIANT
VARIANTVARIANT
FIXEDNUMBER

Scenarios of Data Type Conflicts

In instances where a datatype mismatch occurs, for example, when the datatype of an existing column in the source table is modified, the datatype of the corresponding column in the target table will be determined based on certain defined rules, thereby resolving the conflict. These rules ensure that the most comprehensive data type is chosen to maintain data integrity and avoid loss of information.

Examples of Data Type Conflicts

The table below outlines various scenarios of data type conflicts and the resolution rules. The Inferred Type column represents the chosen data type in the target table when there's a conflict.

Conflicting TypesInferred TypeExample Scenario
TIMESTAMP vs. DATETIMESTAMPIf a column in the source, initially of TIMESTAMP type, is changed to DATE, it will be converted into TIMESTAMP in the target.
SMALLINT vs. BOOLEANSMALLINTA conflict between SMALLINT and BOOLEAN types in the source column will lead to the target column adopting the SMALLINT type.
INTEGER vs. (SMALLINT / BOOLEAN)INTEGERIf an INTEGER is updated to SMALLINT or BOOLEAN in the source, it will be promoted to INTEGER in the target.
BIGINT vs. (INTEGER / SMALLINT / BOOLEAN)BIGINTIf a column of BIGINT type is changed to SMALLINT, BOOLEAN, or INTEGER in the source, it will be elevated to BIGINT in the target.
DECIMAL vs. (INTEGER / BIGINT / SMALLINT / BOOLEAN)DECIMALA column that is INTEGER or DECIMAL in the source will be transformed into DECIMAL.
DOUBLE PRECISION vs. (INTEGER / BIGINT / SMALLINT / BOOLEAN)DOUBLE PRECISIONIf there is a conflict between DOUBLE PRECISION and SMALLINT in the source column, the target column will adopt DOUBLE PRECISION.
REAL vs. (DOUBLE PRECISION / DECIMAL / INTEGER / BIGINT / SMALLINT / BOOLEAN)REALIf a column of DOUBLE PRECISION type is altered to REAL type in the source, it will remain as REAL in the target.
FLOAT vs. (INTEGER / BIGINT / SMALLINT / DECIMAL / REAL / DOUBLE PRECISION / BOOLEAN)FLOATA source column initially of FLOAT type that is updated to INTEGER will remain as FLOAT in the target.
STRING vs. ALL DATATYPESSTRINGIf a source column is initially set as STRING type and later changed to TIME or INTEGER, it will still be treated as STRING type in the target.
VARIANT vs. ALL DATATYPESVARIANTIf a column in the source was VARIANT type and has been updated to INTEGER type, the target column will still retain the VARIANT type.

Please Note:

VARCHAR and OBJECT have higher priority and will override other data types in conflicts.


Was this article helpful?