CLOB Data Type

Description

A character large object containing single-byte or multibyte characters. Both fixed-width and variable-width character sets are supported, both using the database character set. (Oracle SQL Language Reference CLOB Data Type).

CLOB Data Type is not supported in Snowflake. VARCHAR is used instead.

Sample Source Patterns

CLOB in Create Table

Oracle

CREATE TABLE clobtable ( clob_column CLOB, empty_column CLOB );

INSERT INTO clobtable VALUES ( 'THIS IS A TEST', EMPTY_CLOB() );

Snowflake

CREATE OR REPLACE TABLE PUBLIC.clobtable (
clob_column VARCHAR /*** MSC-WARNING - MSCEWI1036 - CLOB DATA TYPE CONVERTED TO VARCHAR ***/,
empty_column VARCHAR /*** MSC-WARNING - MSCEWI1036 - CLOB DATA TYPE CONVERTED TO VARCHAR ***/
);

INSERT INTO PUBLIC.clobtable VALUES ( 'THIS IS A TEST', TO_VARCHAR(' - ') );

Retrieving Data

Oracle

SELECT * FROM clobtable;

Snowflake

SELECT * FROM PUBLIC.clobtable;

Known Issues

1. The difference in max length CLOB (Oracle) and VARCHAR (Snowflake)

An Oracle CLOB column maximum size is (4 gigabytes - 1) * (database block size), but Snowflake VARCHAR is limited to 16MB.

2. Empty value with EMPTY_CLOB

Initializing a column using EMPTY_CLOB() will return an empty LOB locator. While in Snowflake after translation the column will return a string with ' - '.

3. No access to the DBMS_LOB built-in package

Since LOB data types are not supported in Snowflake there is not an equivalent for the DBMS_LOB functions and there are no implemented workarounds yet.

  1. MSCEWI1036: Data type converted to another data type.

Last updated