SSC-EWI-OR0105
Additional work is needed for BFILE column usage. BUILD_STAGE_URL function is a recommended workaround
Severity
Low
Description
The transformation for BFILE datatype is VARCHAR. However, the translation for the Oracle built-in functions used to interact with BFILE types is currently not supported. The column is migrated to a VARCHAR in order to store the file path and name (check the BFILENAME_UDF documentation for more information).
Example Code
Input Code Oracle:
CREATE TABLE bfiletable ( bfile_column BFILE );
INSERT INTO bfiletable VALUES ( BFILENAME('mydirectory', 'myfile.png') );Output Code:
CREATE OR REPLACE TABLE bfiletable ( bfile_column
!!!RESOLVE EWI!!! /*** SSC-EWI-OR0105 - ADDITIONAL WORK IS NEEDED FOR BFILE COLUMN USAGE. BUILD_STAGE_FILE_URL FUNCTION IS A RECOMMENDED WORKAROUND ***/!!!
VARCHAR
)
COMMENT = '{"origin":"sf_sc","name":"snowconvert","version":{"major":1, "minor":0},"attributes":{"component":"oracle"}}'
;
INSERT INTO bfiletable
VALUES (PUBLIC.BFILENAME_UDF('mydirectory', 'myfile.png') );Recommendations
Use the
BUILD_STAGE_FILE_URLand the other file functions to handle files.
CREATE OR REPLACE TABLE bfiletable ( bfile_column
!!!RESOLVE EWI!!! /*** SSC-EWI-OR0105 - ADDITIONAL WORK IS NEEDED FOR BFILE COLUMN USAGE. BUILD_STAGE_FILE_URL FUNCTION IS A RECOMMENDED WORKAROUND ***/!!!
VARCHAR
)
COMMENT = '{"origin":"sf_sc","name":"snowconvert","version":{"major":1, "minor":0},{"attributes":{"component":"oracle"}}'
;
INSERT INTO bfiletable
VALUES (PUBLIC.BFILENAME_UDF('mydirectory', 'myfile.png') );URL |
------------------------------------------------------------------------------------------------------+
https://thecompany.snowflakecomputing.com/api/files/CODETEST/PUBLIC/MY_STAGE/%2Fmydirectory%2Fmyfile.jpg|Change the data type to a supported type.
If you need more support, you can email us at [email protected]
Last updated
