Returning CLOBs from system calls
Hello,
I am trying to call a python routine from DV and it returns a CLOB. Am I able to retrieve the entire CLOB as a STRING or will it be truncated? So far, it seems to return a truncated string, but I can't figure out if its the routine (I am not a python expert) or DV that's truncating it.
Thanks.
Chris
_____________________________________________
begin
select *
into #temp
from "SYSADMIN.execExternalProcess"(
"command" => 'C:\\Program Files\\Python39\\python.exe',
"args" => ARRAY('D:\\Software\\smith-wilson-py\\main.py')
);
select * from #temp;
end;
-
Comment actionsOfficial comment
Hi Chris,
I know that the question was solved in support some time ago already, but still wanted to add this information from developers here so that it can be seen by all who have similar question:
1) SYSADMIN.execExternalProcess limits the result of standard output and standard error which is returned by procedure as CLOB output parameters to 100.000 characters.
2) However, if you see the result in DV Studio, please have in mind that Studio limits the output to 8k characters.
If you need to overcome the limitation 1) above, you can have your external script save data to file and then load file using file.loadFile stored procedure in the file connector. The limitation 2) is just a display limitation, the data behind is not affected.
best regards,Nick
Please sign in to leave a comment.
Comments
1 comment