MSCEWI4024

Incomplete transformation for Bulk Insert

This is a deprecated version of the SnowConvert documentation, please visit the official site HERE.

Severity

Low

Description

This EWI is added when a BULK INSERT inside a stored procedure was not identified at all, so the dependencies for the complete transformation will not be generated. Also the transformed COPY INTO retrieves the file from a tempStage that needs to be created manually.

Code Example

Input Code:

CREATE PROCEDURE BULK_PROC2
AS
 
BULK INSERT dbo.table1 FROM 'E:\test.txt'  
WITH   
(  
   FIELDTERMINATOR ='\t',
   ROWTERMINATOR ='\n'
); 

GO

Output Code:

CREATE OR REPLACE PROCEDURE BULK_PROC2 ()
RETURNS STRING
LANGUAGE JAVASCRIPT
EXECUTE AS CALLER
AS
$$
  // REGION SnowConvert Helpers Code
  // END REGION

  EXEC(`/*** MSC-WARNING - MSCEWI4024 - THE CURRENT BULK INSERT WAS NOT IDENTIFIED BY SNOWCONVERT, DEFAULT TRANSFORMATION TO COPY INTO WAS ADDED BUT WITHOUT ITS DEPENDENCIES ***/
COPY INTO dbo.table1 FROM @tempStage/test.txt`);
$$;

Recommendations

Last updated