XDBURIType

Description

You can use XDBURIType to expose documents in the XML database hierarchy as URIs that can be embedded in any URIType column in a table. The XDBURIType consists of a URL, which comprises the hierarchical name of the XML document to which it refers and an optional fragment representing the XPath syntax. (Oracle SQL Language Reference URI Data Types)

XDBURITYPE

Sample Source Patterns

XDBURIType in create table

Oracle

CREATE TABLE xdburitype_table(
	xdb_uritype_column XDBURITYPE,
	sys_xdb_uritype_column SYS.XDBURITYPE
);

INSERT INTO xdburitype_table (xdb_uritype_column) VALUES(
	xdburitype('/home/OE/employees/emp_selby.xml')
);

Snowflake

CREATE OR REPLACE TABLE PUBLIC.xdburitype_table (
xdb_uritype_column VARIANT /*** MSC-WARNING - MSCEWI1055 - REFERENCED CUSTOM TYPE 'XDBURITYPE' NOT FOUND ***/,
-- ** MSC-ERROR - MSCEWI1028 - TYPE NOT SUPPORTED **
--sys_xdb_uritype_column SYS.VARIANT /*** MSC-WARNING - MSCEWI1055 - REFERENCED CUSTOM TYPE 'XDBURITYPE' NOT FOUND ***/

INSERT INTO PUBLIC.xdburitype_table (xdb_uritype_column) VALUES(/*** MSC-WARNING - MSCEWI1049 - xdburitype FUNCTION WAS NOT RECOGNIZED BY SNOWCONVERT ***/
PUBLIC.xdburitype_UDF('xdburitype(\'/home/OE/employees/emp_selby.xml\')')
);

Retrieving data from XDBURIType column

Oracle

SELECT ut.xdb_uritype_column.getclob() FROM xdburitype_table ut;

Snowflake

 SELECT
 /*** MSC-WARNING - MSCEWI1049 - ut.xdb_uritype_column.getclob FUNCTION WAS NOT RECOGNIZED BY SNOWCONVERT ***/
 PUBLIC.ut.xdb_uritype_column.getclob_UDF('ut.xdb_uritype_column.getclob()')
 FROM PUBLIC.xdburitype_table ut;

getclob function is not being transformed by the tool, but is necessary to display the data in Oracle, this transformation is going to be available in future releases.

Known Issues

1. XDBURIType Data Type not recognized

XDBURIType is parsed and converted as Custom Data Type by SnowConvert or as not supported type if it uses the prefix SYS, there is a work item to fix this issue

  1. MSCEWI1028: Type is not supported.

  2. MSCEWI1055: Referenced Custom Type not found.

  3. MSCEWI1049: Not recognized function.

Last updated