CREATE OR REPLACE TABLE anytypetable ( col1 NUMBER(38, 18) /*** SSC-FDM-0006 - NUMBER TYPE COLUMN MAY NOT BEHAVE SIMILARLY IN SNOWFLAKE. ***/,--** SSC-FDM-0026 - TYPE NOT SUPPORTED BY SNOWFLAKE ** col2 ANYTYPE,--** SSC-FDM-0026 - TYPE NOT SUPPORTED BY SNOWFLAKE ** col3 SYS.ANYTYPE ) COMMENT ='{"origin":"sf_sc","name":"snowconvert","version":{"major":1, "minor":0},{"attributes":{"component":"oracle"}}' ;
Inserting data into ANYTYPE column
Oracle
IN -> Oracle_02.sql
--Create Custom TypeCREATE OR REPLACE TYPE example_type AS OBJECT (id NUMBER, nameVARCHAR(20));--InsertINSERT INTO anytypetable VALUES(123, GETANYTYPEFROMPERSISTENT ('HR', 'EXAMPLE_TYPE'));
Snowflake
OUT -> Oracle_02.sql
--Create Custom Type!!!RESOLVE EWI!!! /*** SSC-EWI-0056 - CUSTOM TYPES ARE NOT SUPPORTED IN SNOWFLAKE BUT REFERENCES TO THIS CUSTOM TYPE WERE CHANGED TO VARIANT ***/!!!CREATE OR REPLACE TYPE example_type AS OBJECT (id NUMBER, nameVARCHAR(20));--Insert--** SSC-FDM-0007 - MISSING DEPENDENT OBJECT "anytypetable" **INSERT INTO anytypetableVALUES(123, GETANYTYPEFROMPERSISTENT ('HR', 'EXAMPLE_TYPE') !!!RESOLVE EWI!!! /*** SSC-EWI-0073 - PENDING FUNCTIONAL EQUIVALENCE REVIEW FOR 'GETANYTYPEFROMPERSISTENT' NODE ***/!!!);
Known Issues
1. No access to the ANYTYPE built-in package
Most operations with ANYDATA columns require to use the ANYTYPE built-in package, transformation for Oracle built-in packages is not supported by SnowConvert yet.