HTTPURIType

Description

You can use HTTPURIType to store URLs to external Web pages or to files. Oracle accesses these files using HTTP (Hypertext Transfer Protocol). (Oracle SQL Language Reference URI Data Types)

HTTPURITYPE

Sample Source Patterns

HTTPURIType in create table

Oracle

CREATE TABLE httpuritype_table(
	http_uritype_column HTTPURITYPE
	sys_http_uritype_column SYS.HTTPURITYPE
);

INSERT INTO httpuritype_table (http_uritype_column) VALUES(
	HTTPURITYPE.createuri('http://localhost/')
);
INSERT INTO httpuritype_table (http_uritype_column) VALUES(
	HTTPURITYPE.createuri('www.google.com')
);

Snowflake

CREATE OR REPLACE TABLE PUBLIC.httpuritype_table (
http_uritype_column VARIANT /*** MSC-WARNING - MSCEWI1055 - REFERENCED CUSTOM TYPE 'HTTPURITYPE' NOT FOUND ***/,
-- ** MSC-ERROR - MSCEWI1028 - TYPE NOT SUPPORTED **
--sys_http_uritype_column SYS.VARIANT /*** MSC-WARNING - MSCEWI1055 - REFERENCED CUSTOM TYPE 'HTTPURITYPE' NOT FOUND ***/
                                                                                                                       );
INSERT INTO PUBLIC.httpuritype_table (http_uritype_column) VALUES(/*** MSC-WARNING - MSCEWI1049 - HTTPURITYPE.createuri FUNCTION WAS NOT RECOGNIZED BY SNOWCONVERT ***/
PUBLIC.HTTPURITYPE.createuri_UDF('HTTPURITYPE.createuri(\'http://localhost/\')')
);

INSERT INTO PUBLIC.httpuritype_table (http_uritype_column) VALUES(/*** MSC-WARNING - MSCEWI1049 - HTTPURITYPE.createuri FUNCTION WAS NOT RECOGNIZED BY SNOWCONVERT ***/
PUBLIC.HTTPURITYPE.createuri_UDF('HTTPURITYPE.createuri(\'www.google.com\')')
);                                                                                                                    

Retrieving data from HTTPURIType column

Oracle

SELECT 
	ut.http_uritype_column.getUrl(),
	ut.http_uritype_column.getExternalUrl()
FROM 
	httpuritype_table ut;

Snowflake

SELECT
/*** MSC-WARNING - MSCEWI1049 - ut.http_uritype_column.getUrl FUNCTION WAS NOT RECOGNIZED BY SNOWCONVERT ***/
PUBLIC.ut.http_uritype_column.getUrl_UDF('ut.http_uritype_column.getUrl()'),
/*** MSC-WARNING - MSCEWI1049 - ut.http_uritype_column.getExternalUrl FUNCTION WAS NOT RECOGNIZED BY SNOWCONVERT ***/
PUBLIC.ut.http_uritype_column.getExternalUrl_UDF('ut.http_uritype_column.getExternalUrl()')
FROM PUBLIC.httpuritype_table ut;

getUrl and getExternalUrl functions are not being transformed by the tool, but are necessary to display the data in Oracle, this transformation is going to be available in future releases.

Known Issues

1. HTTPURIType Data Type not recognized

HTTPURIType 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