Skip to content

Convert Type

Convert the data types of the input flow. Generates a select clause, casting column types.

If possible, it is better to change the source data so that it already has the correct types. However, sometimes it is necessary to convert the types explicitly.

Snowflake types include: VARCHAR, NUMBER, FLOAT, BOOLEAN, DATE, TIMESTAMP, TIME, and VARIANT. The use of these data types is detailed in the Snowflake documentation

Note

  • When appropriate, values are first rounded to the requested decimal places before being cast to the requested size.
  • Users may experience casting errors if using binary values.
  • Although syntax is checked at validation time, runtime errors may occur during type conversion if the input data cannot fit into the requested target type.

Properties

Name = string

A human-readable name for the component.


Conversions = column editor

Enter the following details for each table column.

  • Column Name: The name of the column to convert.
  • Type: Select one of:
    • Varchar: This type is suitable for numbers and letters. A varchar or Variable Character Field is a set of character data of indeterminate length. More....
    • Number: This type is suitable for numeric types, with or without decimals. More....
    • Float: This type of values are approximate numeric values with fractional components. More....
    • Boolean: This type is suitable for data that is either "true" or "false". More....
    • Date: This type is suitable for dates without times. More....
    • Timestamp: This type is a timestamp left unformatted (exists as Unix/Epoch Time). More....
    • Time: This type is suitable for time, independent of a specific date and timezone. More....
    • Variant: Variant is a tagged universal type that can hold up to 16 MB of any data type supported by Snowflake. More....
  • Size: For Text types, this is the maximum length. This is a limit on the number of bytes, not characters. For Numeric types, this is the total number of digits allowed, whether before or after the decimal point.
  • Precision: The precision of the data in the column. Will be 0 (zero) for non-applicable types.