XMLType

circle-info

Important Notice: Migration of Documentation Website

Please be advised that our documentation website is currently undergoing a migration to a new platform. To ensure you have access to the most up-to-date information, we kindly request that you visit our new documentation website located at:

Official Snowflake Snowconvert Documentationarrow-up-right

For any immediate assistance or if you encounter any issues, please contact our support team at [email protected]envelope.

Thank you for your understanding.

Description

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 Typearrow-up-right)

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 postarrow-up-right in the Snowflake forum and the TO_XMLarrow-up-right function documentation in Snowflake.

XMLTYPE

Sample Source Patterns

XMLType in Create Table

Oracle

IN -> Oracle_01.sql
CREATE TABLE xml_table(
    xml_column XMLTYPE
);

Snowflake

Insert data in the XML column

Oracle

Snowflake

Known Issues

1. XMLType manipulation and query functions are not recognized

The functions for manipulating and querying XML such as XMLTYPE() are not being recognized nor transformed by SnowConvert.

  1. SSC-EWI-0036: Data type converted to another data type.

  2. SSC-EWI-OR0016: XML is not supported.

Last updated