TYPE attribute
Description
This chapter is related to transforming the TYPE attribute when it references a column, variable, record, collection, or cursor. The transformation involves getting the referenced item data type and replacing the referencing item TYPE attribute for the data type obtained.
Sample Source Patterns
TYPE attribute for columns
In this case, the referenced item is a column from a table created previously.
Oracle
Snowflake
Further information about NUMBER datatype can be found in Numeric Data Types section.
TYPE attribute for variables
In this case, the referenced item is a variable declared previously.
Oracle
Snowflake
Further information about FLOAT datatype can be found in FLOAT Data Type section
TYPE attribute for records
In this case, the referenced item is a record declared previously.
Oracle
Snowflake
In the example before, the variable which is referencing the record variable is changed to OBJECT
as same as the record variable, and the variable which is referencing the record field is changed to the record field data type (NUMBER (38, 18)
).
These changes don't work for embedded records.
Further information about records can be found in Collection & Records section.
TYPE attribute for collections
In this case, the referenced item is a collection variable, but since collections are not supported, the referencing item TYPE attribute is changed to VARIANT data type.
Oracle
Snowflake
TYPE attribute for cursors
In this case, the referenced item is a cursor variable, but since REF cursors are not supported, the referencing item TYPE attribute is changed to VARIANT data type.
Oracle
Snowflake
For those cases when the data type of the referenced item cannot be obtained, the referencing item TYPE attribute is changed to VARIANT
.
Knows Issues
1. Cursors and collections declarations are not supported.
Collection and cursor variable declarations are not supported yet so the referencing item TYPE attribute is changed to VARIANT and a warning is added in these cases.
2. Original data type could not be obtained.
When the referenced item data type could not be obtained the referencing item TYPE attribute is changed to VARIANT and a warning is added.
Related EWIS
SSC-EWI-0036: Data type converted to another data type.
SSC-EWI-0056: Create Type Not Supported.
SSC-EWI-0058: Functionality is not currently supported by Snowflake Scripting.
SSC-EWI-0062: Custom type usage changed to variant.
SSC-EWI-OR0129: The statement below has usages of nested cursors.
SSC-FDM-0006: Number type column may not behave similarly in Snowflake.
Last updated