SnowConvert AI - Oracle - Any Types¶
Description¶
The
Anytypes provide highly flexible modeling of procedure parameters and table columns where the actual type is not known. These data types let you dynamically encapsulate and access type descriptions, data instances, and sets of data instances of any other SQL type. (Oracle SQL Language Reference ANYTYPES Data Types)
ANYDATA¶
Description¶
This type contains an instance of a given type, with data, plus a description of the type.
ANYDATAcan 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.
Sample Source Patterns¶
Create Table with ANYDATA¶
Oracle¶
Snowflake¶
Inserting data into ANYDATA column¶
Oracle¶
Snowflake¶
Functional Example¶
Warning
This example is not a translation of SnowConvert AI, it is only used to show the functional equivalence between Oracle ANYDATA and Snowflake VARIANT
Warning
We are using the ANYDATA built-in package. The conversion for this package is currently not supported by SnowConvert.
Oracle¶
Result¶
COL1 |
COL2 |
COL3 |
COL4 |
COL5 |
|---|---|---|---|---|
123 |
Test Text |
3.14 |
2021-12-05 18:24:59.000 |
2021-12-05 18:24:59.100 |
Snowflake¶
Result¶
COL1 |
COL2 |
COL3 |
COL4 |
COL5 |
|---|---|---|---|---|
123 |
“Test Text” |
3.14 |
“2021-12-05” |
“2021-12-05 18:24:43.326 -0800” |
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 AI yet.
ANYDATASET¶
Note
Some parts in the output code are omitted for clarity reasons.
Description¶
This type contains a description of a given type plus a set of data instances of that type.
ANYDATASETcan be used as a procedure parameter data type where such flexibility is needed. The values of the data instances can be of SQL built-in types as well as user-defined types. (Oracle SQL Language Reference ANYDATASET Data Type).
The ANYDATASET data type is not supported in Snowflake. A possible workaround for this data type could be Snowflake ARRAY, however that transformation is currently not supported by SnowConvert.
Sample Source Patterns¶
Create Table with ANYDATASET¶
Oracle¶
Snowflake¶
Inserting data into ANYDATASET column¶
Oracle¶
Snowflake¶
Known Issues¶
1. Inserts are being parsed incorrectly¶
Some of the functions needed to create and insert a new ANYDATASET object are not being parsed correctly by SnowConvert.
1. No access to the ANYDATASET built-in package¶
Most operations with ANYDATASET columns require to use the ANYDATASET built-in package, transformation for Oracle built-in packages is not supported by SnowConvert AI yet.
Related EWIs¶
SSC-EWI-OR0076: Built In Package Not Supported.
SSC-FDM-0006: Number type column may not behave similarly in Snowflake
SSC-EWI-0028: Type not supported by Snowflake.
ANYTYPE¶
Description¶
This type can contain a type description of any named SQL type or unnamed transient type. (Oracle SQL Language Reference ANYTYPE Data Type).
The ANYTYPE data type is not supported in Snowflake.
Sample Source Patterns¶
Create Table with ANYTYPE¶
Oracle¶
Snowflake¶
Inserting data into ANYTYPE column¶
Oracle¶
Snowflake¶
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 AI yet.
Related EWIs¶
SSC-EWI-0056: Create Type Not Supported.
SSC-EWI-0073: Pending Functional Equivalence Review.
SSC-EWI-0028: Type not supported in Snowflake.
SSC-FDM-0006: Number type column may not behave similarly in Snowflake.