XMLType
Last updated
Last updated
This Oracle-supplied type can be used to store and query XML data in the database.
XMLType
has member functions you can use to access, extract, and query the XML data using XPath expressions. (Oracle SQL Language Reference XML Data Type)
Snowflake handles semi-structured data types (including XMLTYPE) using the VARIANT data type, for this reason, XMLTYPEs are to be migrated to VARIANT, and then usages of functions used to manipulate and query XML must be migrated to Snowflake's counterparts. For more information on how to use XML in Snowflake, please refer to this post in the Snowflake forum and the TO_XML function documentation in Snowflake.
XMLTYPE
CREATE TABLE xml_table(
xml_column XMLTYPE
);
CREATE OR REPLACE TABLE xml_table (
xml_column VARIANT !!!RESOLVE EWI!!! /*** SSC-EWI-0036 - XMLTYPE DATA TYPE CONVERTED TO VARIANT ***/!!!
)
COMMENT = '{"origin":"sf_sc","name":"snowconvert","version":{"major":1, "minor":0},{"attributes":{"component":"oracle"}}'
;
INSERT INTO xml_table VALUES(
XMLType(
'<?xml version="1.0"?>
<note>
<to>SnowConvert</to>
<from>Oracle</from>
<heading>Greeting</heading>
<body>Hello there!</body>
</note>')
);
INSERT INTO xml_table
VALUES(
!!!RESOLVE EWI!!! /*** SSC-EWI-OR0016 - FUNCTION RELATED WITH XML NOT SUPPORTED ***/!!!
XMLType(
'<?xml version="1.0"?>
<note>
<to>SnowConvert</to>
<from>Oracle</from>
<heading>Greeting</heading>
<body>Hello there!</body>
</note>')
);
The functions for manipulating and querying XML such as XMLTYPE() are not being recognized nor transformed by SnowConvert.
SSC-EWI-0036: XMLTYPE DATA TYPE CONVERTED TO VARIANT