> ## Documentation Index
> Fetch the complete documentation index at: https://docs.maia.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Convert Type

export const ComponentMetadata = ({warehouses, unsupportedWarehouses = [], componentType, connectionInputs, connectionOutputs}) => {
  const allWarehouses = [...warehouses.map(w => ({
    name: w,
    supported: true
  })), ...unsupportedWarehouses.map(w => ({
    name: w,
    supported: false
  }))];
  return <div style={{
    background: 'var(--colors-background-light, #f9fafb)',
    border: '1px solid var(--colors-border-default, #e5e7eb)',
    borderRadius: '12px',
    padding: '20px 28px',
    marginBottom: '28px',
    boxShadow: '0 1px 4px rgba(0,0,0,0.10)'
  }}>
      <table style={{
    width: '100%',
    borderCollapse: 'collapse'
  }}>
        <tbody>
          <tr>
            <td style={{
    fontWeight: '600',
    paddingRight: '32px',
    paddingBottom: '14px',
    whiteSpace: 'nowrap',
    verticalAlign: 'middle',
    width: '180px'
  }}>Project Availability</td>
            <td style={{
    paddingBottom: '14px',
    verticalAlign: 'middle'
  }}>
              <div style={{
    display: 'flex',
    flexWrap: 'wrap',
    gap: '8px'
  }}>
                {allWarehouses.map((w, i) => <span key={i} style={{
    background: w.supported ? '#dcfce7' : '#fee2e2',
    color: w.supported ? '#15803d' : '#b91c1c',
    border: `1px solid ${w.supported ? '#bbf7d0' : '#fca5a5'}`,
    borderRadius: '9999px',
    padding: '3px 12px',
    fontSize: '0.85rem',
    fontWeight: '500',
    whiteSpace: 'nowrap'
  }}>
                    {w.name} {w.supported ? '✅' : '❌'}
                  </span>)}
              </div>
            </td>
          </tr>
          <tr>
            <td style={{
    fontWeight: '600',
    paddingRight: '32px',
    paddingBottom: '14px',
    whiteSpace: 'nowrap',
    verticalAlign: 'middle'
  }}>Component Type</td>
            <td style={{
    paddingBottom: '14px',
    verticalAlign: 'middle'
  }}>{componentType}</td>
          </tr>
          <tr>
            <td style={{
    fontWeight: '600',
    paddingRight: '32px',
    paddingBottom: '14px',
    whiteSpace: 'nowrap',
    verticalAlign: 'middle'
  }}>Connection Inputs</td>
            <td style={{
    paddingBottom: '14px',
    verticalAlign: 'middle'
  }}>{connectionInputs}</td>
          </tr>
          <tr>
            <td style={{
    fontWeight: '600',
    paddingRight: '32px',
    whiteSpace: 'nowrap',
    verticalAlign: 'middle'
  }}>Connection Outputs</td>
            <td style={{
    verticalAlign: 'middle'
  }}>{connectionOutputs}</td>
          </tr>
        </tbody>
      </table>
    </div>;
};

<ComponentMetadata warehouses={["Snowflake", "Databricks", "Amazon Redshift", "Google BigQuery"]} componentType="Transformation" connectionInputs="One" connectionOutputs="Unlimited" />

The **Convert Type** transformation component lets you change the data types of the input flow by generating a SELECT clause that casts column types to a new specified type.

If possible, it's better to change the source data so that it already has the correct types. However, sometimes it's 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](https://docs.snowflake.net/manuals/sql-reference/data-types.html).
* Databricks types include: INTEGER, NUMBER, FLOAT, TEXT, TIMESTAMP, DATE, BOOLEAN, and BINARY. The use of these data types is detailed in the [Databricks documentation](https://docs.databricks.com/en/sql/language-manual/sql-ref-datatypes.html).
* Amazon Redshift types include: TEXT, INTEGER, NUMERIC, REAL, DOUBLE PRECISION, BOOLEAN, DATE, DATETIME, and SUPER. The use of these data types is detailed in the [Amazon Redshift documentation](https://docs.aws.amazon.com/redshift/latest/dg/c_Supported_data_types.html).
* Google BigQuery types include: STRING, INT64, FLOAT64, NUMERIC, BIGNUMERIC, BOOL, BYTES, DATE, DATETIME, TIME, TIMESTAMP, and INTERVAL. The use of these data types is detailed in the [Google BigQuery documentation](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types).

<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.
</Note>

### Use case

This component is useful when you need to ensure that the data types in your dataset match the requirements of your cloud data warehouse or when you want to standardize data types across different datasets. For example, you might use this component to:

* Standardize data types across multiple datasets for auditing and regulation.
* Align mismatched types across disparate systems for downstream join or merge operations.
* Convert string representations of dates or numbers into their respective date or numeric types for accurate calculations and comparisons.

***

## Properties

<ResponseField name="Name" type="string" required>
  A human-readable name for the component.
</ResponseField>

<Tabs>
  <Tab title="Snowflake">
    {/* <!-- param-start:[conversions] | warehouses: [snowflake] --> */}

    <ResponseField name="Conversions" type="column editor" required>
      Enter the following details for each table column:

      * **Column:** The name of the column to convert.
      * **Type:** The type to cast the column to.
      * **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.

      | Type                                                                                                          | Description                                                                                                                 |
      | ------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
      | [Varchar](https://docs.snowflake.com/en/sql-reference/functions/as_char-varchar.html)                         | Suitable for numbers and letters. A varchar or Variable Character Field is a set of character data of indeterminate length. |
      | [Number](https://docs.snowflake.com/en/sql-reference/data-types-numeric.html)                                 | Suitable for numeric types, with or without decimals.                                                                       |
      | [Float](https://docs.snowflake.com/en/sql-reference/data-types-numeric#data-types-for-floating-point-numbers) | Approximate numeric values with fractional components.                                                                      |
      | [Boolean](https://docs.snowflake.com/en/sql-reference/operators-logical.html)                                 | Suitable for data that is either "true" or "false", or "1" or "0", respectively.                                            |
      | [Date](https://docs.snowflake.com/en/sql-reference/data-types-datetime.html#date)                             | Suitable for dates without times.                                                                                           |
      | [Timestamp](https://docs.snowflake.com/en/sql-reference/data-types-datetime.html#timestamp)                   | A timestamp left unformatted (exists as Unix/Epoch Time).                                                                   |
      | [Time](https://docs.snowflake.com/en/sql-reference/data-types-datetime.html#time)                             | Suitable for time, independent of a specific date and timezone.                                                             |
      | [Variant](https://docs.snowflake.com/en/sql-reference/functions/to_variant.html)                              | A tagged universal type that can hold up to 16 MB of any data type supported by Snowflake.                                  |

      To use grid variables, toggle **Use Grid Variable** on at the bottom of the dialog. For more information, read [Grid variables](/docs/guides/grid-variables).

      Click the **Text mode** toggle at the bottom of the dialog to open a multi-line editor that lets you add items in a single block. For more information, read [Text mode](/docs/guides/components-overview#text-mode).
    </ResponseField>

    {/* <!-- param-end:[conversions] --> */}
  </Tab>

  <Tab title="Databricks">
    {/* <!-- param-start:[conversions] | warehouses: [databricks] --> */}

    <ResponseField name="Conversions" type="column editor" required>
      Enter the following details for each table column:

      * **Column:** The name of the column to convert.
      * **Type:** The type to cast the column to.
      * **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.

      | Type                                                                                           | Description                                                                                                                 |
      | ---------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
      | [Integer](https://docs.databricks.com/en/sql/language-manual/data-types/int-type.html)         | Suitable for whole numbers (no decimals).                                                                                   |
      | [Number](https://docs.databricks.com/en/sql/language-manual/sql-ref-datatypes.html)            | Suitable for numeric types, with or without decimals.                                                                       |
      | [Float](https://docs.databricks.com/en/sql/language-manual/data-types/float-type.html)         | Approximate numeric values with fractional components.                                                                      |
      | [Text](https://docs.databricks.com/en/sql/language-manual/data-types/string-type.html)         | Represents character string values.                                                                                         |
      | [Boolean](https://docs.databricks.com/en/sql/language-manual/data-types/boolean-type.html)     | Suitable for data that is either "true" or "false", or "1" or "0", respectively.                                            |
      | [Binary](https://docs.databricks.com/en/sql/language-manual/data-types/binary-type.html)       | Represents byte sequence values.                                                                                            |
      | [Date](https://docs.databricks.com/en/sql/language-manual/data-types/date-type.html)           | Suitable for dates without times.                                                                                           |
      | [Timestamp](https://docs.databricks.com/en/sql/language-manual/data-types/timestamp-type.html) | A timestamp left unformatted (exists as Unix/Epoch Time).                                                                   |
      | [Variant](https://docs.databricks.com/aws/en/sql/language-manual/data-types/variant-type)      | A semi-structured data type that can store data of multiple types within a single column, similar to how JSON objects work. |

      <Note>
        The VARIANT data type is supported only in Databricks Runtime version 15.4 and above. It's recommended to verify the runtime version you're using in your default environment, as VARIANT isn't compatible with versions earlier than 15.4.
      </Note>

      To use grid variables, toggle **Use Grid Variable** on at the bottom of the dialog. For more information, read [Grid variables](/docs/guides/grid-variables).

      Click the **Text mode** toggle at the bottom of the dialog to open a multi-line editor that lets you add items in a single block. For more information, read [Text mode](/docs/guides/components-overview#text-mode).
    </ResponseField>

    {/* <!-- param-end:[conversions] --> */}
  </Tab>

  <Tab title="Amazon Redshift">
    {/* <!-- param-start:[conversions] | warehouses: [redshift] --> */}

    <ResponseField name="Conversions" type="column editor" required>
      Enter the following details for each table column:

      * **Column:** The name of the column to convert.
      * **Type:** The type to cast the column to.
      * **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.
      * **Format:** The DateTime format. This is only required if **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, read the [Amazon Redshift documentation](http://docs.aws.amazon.com/redshift/latest/dg/r_DATEFORMAT_and_TIMEFORMAT_strings.html).

      | Type                                                                                                                               | Description                                                    |
      | ---------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------- |
      | [TEXT](http://docs.aws.amazon.com/redshift/latest/dg/r_Character_types.html#r_Character_types-text-and-bpchar-types)               | Represents character string values, subject to a maximum size. |
      | [INTEGER](http://docs.aws.amazon.com/redshift/latest/dg/r_Numeric_types201.html#r_Numeric_types201-integer-types)                  | Suitable for whole-number data (no decimals).                  |
      | [NUMERIC](http://docs.aws.amazon.com/redshift/latest/dg/r_Numeric_types201.html#r_Numeric_types201-decimal-or-numeric-type)        | Suitable for numeric data values, with or without decimals.    |
      | [REAL](https://docs.aws.amazon.com/redshift/latest/dg/r_Numeric_types201.html#r_Numeric_types201-floating-point-types)             | Suitable for data of a single precision floating-point number. |
      | [DOUBLE PRECISION](https://docs.aws.amazon.com/redshift/latest/dg/r_Numeric_types201.html#r_Numeric_types201-floating-point-types) | Suitable for data of a double precision floating-point number. |
      | [BOOLEAN](http://docs.aws.amazon.com/redshift/latest/dg/r_Boolean_type.html)                                                       | Suitable for data that is either true or false.                |
      | [DATE](https://docs.aws.amazon.com/redshift/latest/dg/r_Datetime_types.html#r_Datetime_types-date)                                 | Suitable for dates without times.                              |
      | [DATETIME](http://docs.aws.amazon.com/redshift/latest/dg/r_Datetime_types.html)                                                    | Suitable for dates, times, or timestamps (both date and time). |
      | [SUPER](https://docs.aws.amazon.com/redshift/latest/dg/r_SUPER_type.html)                                                          | Stores semi-structured data or documents as values.            |

      To use grid variables, toggle **Use Grid Variable** on at the bottom of the dialog. For more information, read [Grid variables](/docs/guides/grid-variables).

      Click the **Text mode** toggle at the bottom of the dialog to open a multi-line editor that lets you add items in a single block. For more information, read [Text mode](/docs/guides/components-overview#text-mode).
    </ResponseField>

    {/* <!-- param-end:[conversions] --> */}
  </Tab>

  <Tab title="Google BigQuery">
    {/* <!-- param-start:[conversions] | warehouses: [bigquery] --> */}

    <ResponseField name="Conversions" type="column editor" required>
      Enter the following details for each table column:

      * **Column:** The name of the column to convert.
      * **Type:** The type to cast the column to.

      | Type                                                                                                     | Description                                                          |
      | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------- |
      | [STRING](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types#string_type)           | Variable-length character data.                                      |
      | [INT64](https://docs.cloud.google.com/bigquery/docs/reference/standard-sql/data-types#integer_types)     | Suitable for whole numbers (no decimals).                            |
      | [FLOAT64](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types#floating_point_types) | Approximate numeric values with fractional components.               |
      | [NUMERIC](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types#numeric_type)         | Suitable for numeric data with exact precision.                      |
      | [BIGNUMERIC](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types#bignumeric_type)   | Suitable for high-precision numeric data.                            |
      | [BOOL](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types#boolean_type)            | Boolean. Suitable for data that is either "true" or "false".         |
      | [BYTES](https://docs.cloud.google.com/bigquery/docs/reference/standard-sql/data-types#bytes_type)        | Variable-length binary data.                                         |
      | [DATE](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types#date_type)               | Suitable for dates without times.                                    |
      | [DATETIME](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types#datetime_type)       | Suitable for dates and times without timezone information.           |
      | [TIME](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types#time_type)               | Suitable for time, independent of a specific date.                   |
      | [TIMESTAMP](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types#timestamp_type)     | An absolute point in time, with microsecond precision.               |
      | [INTERVAL](https://docs.cloud.google.com/bigquery/docs/reference/standard-sql/data-types#interval_type)  | A duration of time, without referring to any specific point in time. |

      To use grid variables, toggle **Use Grid Variable** on at the bottom of the dialog. For more information, read [Grid variables](/docs/guides/grid-variables).

      Click the **Text mode** toggle at the bottom of the dialog to open a multi-line editor that lets you add items in a single block. For more information, read [Text mode](/docs/guides/components-overview#text-mode).
    </ResponseField>

    {/* <!-- param-end:[conversions] --> */}
  </Tab>
</Tabs>
