SnowConvert AI - IBM DB2 - CREATE TYPE¶
This page describes how SnowConvert translates Db2 distinct types (CREATE DISTINCT TYPE ... AS type) and structured CREATE TYPE ... AS (...) definitions. Distinct types map to Snowflake CREATE TYPE name AS <base_type>; attribute lists map to OBJECT(...).
Distinct types¶
CREATE DISTINCT TYPE becomes CREATE TYPE. The WITH COMPARISONS clause is not carried forward; base types use the same data-type normalization as the rest of the Db2 migration.
Source (Db2):
Snowflake equivalent:
Source (Db2):
Snowflake equivalent:
Source (Db2):
Snowflake equivalent:
Structured types (attribute list)¶
Composite-style definitions with CREATE TYPE name AS (col type, ...) map to Snowflake OBJECT(...).
Source (Db2):
Snowflake equivalent:
Source (Db2):
Snowflake equivalent:
Notes: Unsupported or highly Db2-specific type features may still emit EWIs/FDMs. For structured types, IBM also documents CREATE TYPE (structured) (https://www.ibm.com/docs/en/db2/11.5?topic=statements-create-type-structured).