-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to pass an object to RUDF in hive #73
Comments
If you just pass value into the RHive-UDF, you can do like the following: Minimum = function(column1,column2_, a_){ rhive.query("select R('Minimum',col1,col2,-10000,0.0) from table_name") However, RHive just export the UDF function and RHive-UDF is executed at Minimum = function(column1,column2_, a_){ Thanks. On Tue, Nov 4, 2014 at 3:10 PM, rajasekhariitbbs [email protected]
|
These are the following rhive.evn() select queries are working good ######### User Define Functions ######## The above rhive.export is saving the files in filesystem /rhive/udf/training, Is that correct? |
You cannot assign and export a variable 'coefficient'. Exported file will be saved in HDFS : /rhive/udf/{user}. On Tue, Nov 4, 2014 at 5:51 PM, rajasekhariitbbs [email protected]
|
In my case the file is being saved in local file system, I'm confused and don't know why it is happening, In the below URL they are exporting the coefficient also |
If RHive-UDF reference R Object( *.RData) as first param of R() in Query. rhive.query("select R('scoring',col_sal,0.0) from emp") In your case, two R Object is saved in HDFS because you use rhive.export()
So, scoring function in scoring.RData cannot reference coefficient value Please, try again. On Tue, Nov 4, 2014 at 6:03 PM, rajasekhariitbbs [email protected]
|
Working Function
Minimum = function(column1,column2){
min(column1,column2)
}
Not Working
a=-10000
Minimum = function(column1,column2){
min(column1,column2,a)
}
How to pass an object/dataframe/function into the RHive-UDF
Thanks
Raja Sekhar
The text was updated successfully, but these errors were encountered: