I am trying to use the shell_load_package Extension Package.
I have created a simple python script that transform a line into an other line, called test.py
The script is owned by dbadmin, and executable.
-rwxr-xr-x 1 dbadmin verticadba 5603 May 6 20:31 test.py
I am trying to run the following copy command:
COPY t FROM '/home/dbadmin/test_data/*' ON my_node0001
WITH filter ExternalFilter(cmd='python /home/dbadmin/test.py')
DELIMITER E'\t' NULL '\N'
EXCEPTIONS '/data/copy_errors/'
REJECTED DATA '/data/copy_errors/';
But I am getting the following error:[Vertica][VJDBC](3399) ERROR: Failure in UDx RPC call InvokeProcessUDL(): Error calling processUDL() in User Defined Object [ExternalFilter] at [ProcessLaunchingPlugin.cpp:82], error code: 0, message: External process 'python /home/dbadmin/test.py' reported error: python: can't open file '/home/dbadmin/test.py': [Errno 13] Permission denied
If I run that same command with WITH filter ExternalFilter(cmd='cat'), it works fine.Quesitons:
1) Any suggestion what the permissions needs to change to make this work?
2) Is there any other way to write a python based UDF that I can just execute on a column of a table in Vertica, other than writing it in C++, Java or R?
Thanks for any suggestions!