Options

R UDF Library Error on Syntax

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?

Comments

  • Options
    PRanaPRana Employee
    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
  • Options
    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.

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file