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' |
|
Select rows from the UDF. For example:
SELECT * FROM my_udf(5) |