Unable to find vertica_sdk
I am trying to write a custom UD Filter in Python as in the below screenshot
But I am unable to find the vertica_sdk module, how can I fix this
0
I am trying to write a custom UD Filter in Python as in the below screenshot
But I am unable to find the vertica_sdk module, how can I fix this
Answers
There is no such thing as a ready-made sdk module . There is, however, a software development kit, with plugin locations in Vertica's software.
And there are examples that you inspire yourself on when you build your own custom functionality.
For Python, on any Vertica node, go:
There's no sample on UDFilter, true, but there is one on UDParsers; you could start from that one to build your custom UDFilter Python script
Thanks @marcothesane .
All the py samples seems to be inheriting some class from vertica_sdk, are you saying these are just examples and doesnt work?
Also in case of UDFilter the documentation says the subclass should override and provide implementation for process() method
and I am using UDFilter I also need to subclass FilterFactory class
examples in the documentations also suggest importing vertica_sdk
Did you perform the steps in the below link? vertica_sdk should be available after you set up environment as shown in the below link.
https://docs.vertica.com/24.2.x/en/extending/developing-udxs/developing-with-sdk/python-sdk/setting-up-python-development-environment
I have created the virtual env but still see an error which says modulenot found
In my PyUXD I am trying to use a lz4 module which helps me with decompressing the file , but I get only a error saying modulenotfound
PyUDX
**Creating library :- **
CREATE OR REPLACE LIBRARY UDFilterTest AS '/usr/pyudx/UDFilter.py' DEPENDS '/usr/pyudx/lib64/python3.9/site-packages/*' LANGUAGE 'Python';
error :-
I see that now the error is different. Did you install lz4 module using pip install lz4 on the server?