REF Data Types
Description
An object identifier (represented by the keyword
OID) uniquely identifies an object and enables you to reference the object from other objects or relational tables. A data type category calledREFrepresents such references. AREFdata type is a container for an object identifier.REFvalues are pointers to objects. (Oracle SQL Language Reference REF Data Types)
REF Data types are not supported in Snowflake, and there is no current workaround to implement a similar component.
As of now, they are currently being recognized as user-defined functions and "DANGLING" clauses are not being recognized. Finally, the OID clause in view is being removed, as there is no workaround for them.
CREATE VIEW generic_view AS
SELECT REF(type) AS ref_col, MAKE_REF(type, identifier_column) AS make_ref_col
FROM generic_table;
SELECT v.ref_col, v.make_ref_col
FROM generic_view v
WHERE v.ref_col IS NOT DANGLING AND v.make_ref_col IS NOT DANGLINGSample Source Patterns
Types and Tables for References
Please consider the following types, tables, inserts and view. They will be used for the next pattern section.
Oracle
Selects and Views using REFs
Oracle
Snowflake
Known Issues
1. REF and MAKE_REF are not being recognized
Instead they are currently being marked as user-defined functions.
2. DANGLING clause is not being recognized
DANGLING clauses are causing parsing errors when running SnowConvert.
3. OID Clauses in view are not supported by SnowConvert, but there is no EWI related to them
The OID clause is not supported by either SnowConvert, nor Snowflake but there should be an EWI related to them.
Related EWIs
SSC-EWI-0001: Unrecognized token on the line of the source code.
SSC-EWI-0073: Pending Functional Equivalence Review.
Last updated