ANYDATA

Description

This type contains an instance of a given type, with data, plus a description of the type. ANYDATA can be used as a table column data type and lets you store heterogeneous values in a single column. The values can be of SQL built-in types as well as user-defined types. (Oracle SQL Language Reference ANYDATA Data Type).

The ANYDATA data type is not supported in Snowflake.

{ SYS.ANYDATA | ANYDATA }

Sample Source Patterns

Create Table with ANYDATA

Oracle

IN -> Oracle_01.sql
CREATE TABLE anydatatable
(
    col1 NUMBER,
    col2 ANYDATA,
    col3 SYS.ANYDATA
);

Snowflake

OUT -> Oracle_01.sql
CREATE OR REPLACE TABLE anydatatable
    (
        col1 NUMBER(38, 18) /*** SSC-FDM-0006 - NUMBER TYPE COLUMN MAY NOT BEHAVE SIMILARLY IN SNOWFLAKE. ***/,
        col2 VARIANT,
        col3 VARIANT
    )
    COMMENT = '{"origin":"sf_sc","name":"snowconvert","version":{"major":1, "minor":0},{"attributes":{"component":"oracle"}}'
    ;

Inserting data into ANYDATA column

Oracle

Snowflake

Functional Example

Oracle

Snowflake

Known Issues

1. No access to the ANYDATA built-in package

Most operations with ANYDATA columns require to use the ANYDATA built-in package, transformation for Oracle built-in packages is not supported by SnowConvert yet.

  1. SSC-FDM-0006: Number type column may not behave similarly in Snowflake.

  2. SSC-EWI-0073: Pending Functional Equivalence Review.

Last updated