Skip to main content

R UDF Library Error on Syntax

  • March 14, 2014
  • 2 replies
  • 16 views

Said_Montiel
Forum|alt.badge.img+1
I am creating UDFs for a system and built a simple R script. However, after loading the script to the server and running CREATE LIBRARY correctly i get the following
sql:statement.sql:3: ROLLBACK 3399:  Failure in UDx RPC call  InvokeSetExecContext(): Error calling setupExecContext() in User Defined Object  [] at [/scratch_a/release/vbuild/vertica/OSS/UDxFence/vertica-udx-R.cpp:129],  error code: 0, message: Exception in Validate Library:<text>:2:33:  unexpected input
1: myfunction <- function (dataset){


I encountered this issue before and realized there is something wrong with how Vertica reads the file. The my solution approach was to place the marker right before the "{" then ENTER, then BACKSPACE and SAVE.

I suspect this has to do with text format. But the latest error wasn't solved this way, the script had to be copied and saved entirely in a separate file.


Any ideas, suggestions, or insight?

2 replies

PRana
Forum|alt.badge.img
  • Participating Frequently
  • March 14, 2014
Hi Said,

Vertica displays the above error when there is an error in the R script. It looks like your file may have some invisible special characters. Please create a new file and then try creating the library. If the problem persists, please attach your file to the post.

Thanks
Pratibha

Said_Montiel
Forum|alt.badge.img+1
  • Author
  • Participating Frequently
  • April 7, 2014
Hi Pratibha!

It had special characters but they are related to how Linux reads a file generated in Windows. The issue has been solved and we only update the file to avoid the error.