Reputation: 609
I have created a UDF (user-defined function) in IBM Netezza. I would like to extract the underlying C++ class code, and/or the SQL script that creates this UDF. I need to extract these using a SQL query in IBM Netezza.
Any help in reaching this goal is highly appreciated.
Upvotes: 0
Views: 1062
Reputation: 1043
Your question is combination of 2 separate questions in one-
1) "I would like to extract the underlying C++ class code" Ans -> This is practically not possible to extract code from object file. When you write code for UDF and compiles with "nzudxcompile" utility, it creates 2 object files for SPU and HOST.
2) "the SQL script that creates this UDF" Ans => This sql script has not much information except function signature, and CPP file name. This file is almost common with every other SQL script to create UDF in database.
Example attached -
nzudxcompile <CPP Name> --unfenced --version 2 --sig <Function signature>
--return <Return type> --class <Class name>
--deps <If function depends on any third party lib> --db <DB name>
Hope this will help you.
Upvotes: 1