Learning Roadmap for SQL Analysts

Reference a C or C++ table UDF in your SQL query.

Task See:

Obtain the .dll or .so file (for example, myudf.dll) from the UDF developer.

Place the .dll file in the bin64 directory; place the .so file in the lib64 or LD_LIBRARY_PATH directory.

Not applicable.

Define the CREATE PROCEDURE statement, referencing the .dll file and the callback function.

For example:
CREATE PROCEDURE my_udf( IN num_row INT ) 
RESULT( id INT ) 
EXTERNAL NAME 'udf_rg_proc@myudf.dll'

CREATE PROCEDURE Statement (Table UDF)

Select rows from the UDF.

For example:
SELECT * FROM my_udf(5)

SELECT Statement

FROM Clause

Related concepts
SQL Reference for Table UDF and TPF Queries