BFILENAME UDF

Description

This function takes the directory name and the file name parameters of the Oracle BFILENAME() as STRING and returns a concatenation of them using \. Since BFILE is translated to VARCHAR, the BFILENAME result is handled as text.

Custom UDF overloads

BFILENAME_UDF(string, string)

It concatenates the directory path and the file name.

Parameters

  1. DIRECTORYNAME: A STRING that represents the directory path.

  2. FILENAME: A STRING that represents the file name.

CREATE OR REPLACE FUNCTION PUBLIC.BFILENAME_UDF (DIRECTORYNAME STRING, FILENAME STRING)
RETURNS STRING
LANGUAGE SQL
IMMUTABLE 
COMMENT = '{"origin":"sf_sc","name":"snowconvert","version":{"major":1, "minor":0},"attributes":{"component":"udf"}}'
AS
$$
	DIRECTORYNAME || '\\' || FILENAME
$$;

Oracle

Snowflake

Known Issues

1. No access to the DBMS_LOB built-in package

Since LOB data types are not supported in Snowflake there is not an equivalent for the DBMS_LOB functions and there are no implemented workarounds yet.

  1. SSC-EWI-OR0105: Additional Work Is Needed For BFILE Column Usage.

Last updated