SSC-EWI-OR0104

Unusable collection variable

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 Documentation

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

Thank you for your understanding.

Severity

High

Description

Oracle collections are not currently supported by SnowConvert, all the collection types variables and their usages will be commented out.

Generate Procedures and Macros using JavasScript as the target language adding the following flag -t JavaScript or --PLTargetLanguage JavaScript

Example Code

Input Code Oracle:

IN -> Oracle_01.sql
-- Additional Params: -t JavaScript
CREATE OR REPLACE PROCEDURE collection_variable_sample_proc
IS
    TYPE POPULATION IS TABLE OF NUMBER INDEX BY VARCHAR2(64); --Associative array
    city_population POPULATION := POPULATION();
    i  VARCHAR2(64);
BEGIN
	city_population('Smallville')  := 2000;
    city_population('Midland')     := 750000;

    i := city_population.FIRST;
    i := city_population.NEXT(1);
END;

Output Cod

OUT -> Oracle_01.sql
CREATE OR REPLACE PROCEDURE collection_variable_sample_proc ()
RETURNS STRING
LANGUAGE JAVASCRIPT
COMMENT = '{ "origin": "sf_sc", "name": "snowconvert", "version": {  "major": 0,  "minor": 0,  "patch": "0" }, "attributes": {  "component": "oracle",  "convertedOn": "12/16/2024",  "domain": "test" }}'
EXECUTE AS CALLER
AS
$$
	// SnowConvert Helpers Code section is omitted.

	!!!RESOLVE EWI!!! /*** SSC-EWI-OR0072 - PROCEDURAL MEMBER TYPE DEFINITION NOT SUPPORTED. ***/!!!
	/*     TYPE POPULATION IS TABLE OF NUMBER INDEX BY VARCHAR2(64) */
	;
	!!!RESOLVE EWI!!! /*** SSC-EWI-OR0104 - UNUSABLE VARIABLE, ITS TYPE WAS NOT TRANSFORMED ***/!!!
	/*     city_population POPULATION := POPULATION() */
	;
	let I;
	!!!RESOLVE EWI!!! /*** SSC-EWI-OR0104 - UNUSABLE VARIABLE, ITS TYPE WAS NOT TRANSFORMED ***/!!!
	/* 	city_population('Smallville')  := 2000 */
	;
	!!!RESOLVE EWI!!! /*** SSC-EWI-OR0104 - UNUSABLE VARIABLE, ITS TYPE WAS NOT TRANSFORMED ***/!!!
	/*     city_population('Midland')     := 750000 */
	;
	I =
		!!!RESOLVE EWI!!! /*** SSC-EWI-OR0104 - UNUSABLE VARIABLE, ITS TYPE WAS NOT TRANSFORMED ***/!!!
		/*city_population.FIRST*/
		null;
	I =
		!!!RESOLVE EWI!!! /*** SSC-EWI-OR0104 - UNUSABLE VARIABLE, ITS TYPE WAS NOT TRANSFORMED ***/!!!
		/*city_population.NEXT(1)*/
		null;
$$;

Recommendations

  • No end-user action is required.

  • If you need more support, you can email us at [email protected]

Last updated