Skip to content

Convert Type

Convert the data types of the input flow.

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.

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

  • Column: The column name from the input flow. Add as many rows to the editor as you need, one per input column.
  • Type: Select either VARCHAR, NUMBER, FLOAT, BOOLEAN, DATE, TIMESTAMP, TIME, or VARIANT as the data type for this column.
  • Size: Specify the number of digits in the NUMBER and VARCHAR data types. Values may be between 0 and 38. If left incomplete, Snowflake will default to 38 digits.
  • Precision: The number of decimal places in NUMBER and VARCHAR types. The default is 0, indicating an integer.

Name = string

A human-readable name for the component.


Conversions = column editor

  • Column: The column name from the input flow. Add as many rows to the editor as you need, one per input column.
  • Data Type: Select from INTEGER, NUMBER, FLOAT, TEXT, TIMESTAMP, DATE, BOOLEAN, BINARY as the data type for this column.
  • Size: Set the data type size.
  • Scale: Set the data type scale.

Name = string

A human-readable name for the component.


Conversions = column editor

  • Column: The column name from the input flow. Add as many rows to the editor as you need, one per input column.
  • Data Type: Select either VARCHAR, NUMBER, FLOAT, BOOLEAN, DATE, TIMESTAMP, TIME, or VARIANT as the data type for this column.
    • Text: This type can hold any kind of data, subject to a maximum size. More...
    • Integer: This type is suitable for whole-number types (no decimals). More...
    • Numeric: This type is suitable for numeric types, with or without decimals. More...
    • Real: This type is suitable for data of a single precision floating-point number. More...
    • Double Precision: This type is suitable for data of a double precision floating-point number. 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...
    • DateTime: This type is suitable for dates, times, or timestamps (both date and time). More...
    • SUPER: Use the SUPER data type to store semi-structured data or documents as values. More...
  • Size: The Size of the output field. This is required for Text and Numeric types.
  • Precision: The number of decimal places. This is only required for Numeric and Real types.
  • Format: The DateTime format. This is only required if the Type is set to Date or DateTime. If your input column is Text and you want to convert to Date or Datetime, specify the input format of the input column. For an exhaustive list of possible formats, see the Amazon Redshift Documentation.

Name = string

A human-readable name for the component.


Conversions = column editor

  • Column: The column name from the input flow. Add as many rows to the editor as you need, one per input column.
  • Type: Select either String, Integer, Float, Boolean, Date, Time, DateTime, or Timestamp.

Name = string

A human-readable name for the component.


Conversions = column editor

  • Column: The column name from the input flow. Add as many rows to the editor as you need, one per input column.
  • Type: Select the data type. Available types include DATE, DATETIME, TIME, INTEGER, NUMERIC, TEXT, FLOAT, BOOLEAN.
  • Size: Define the size. For T-SQL, this is denoted as Precision. More...
  • Precision: Define the precision. For T-SQL, this is denoted as Scale. More...

Strategy

Generates a select clause, casting column types.


Snowflake Delta Lake on Databricks Amazon Redshift Google BigQuery Azure Synapse Analytics