Quantcast
Channel: SCN : Discussion List - SAP HANA Developer Center
Viewing all articles
Browse latest Browse all 6412

HANA RLANG, problem with temporary file

$
0
0

I'm using SAP HANA together with R. I use the cSPADE implementation in R and therefore load the data into a temporary file.

However until know it worked fine so far but now I getting an error. It seems to be some problem with the temporary file.

 

Could not execute 'CALL "BETA_SYSTEM"."run"()' in 15.741 seconds .

SAP DBTech JDBC: [2048]: column store error:  [2048] "BETA_SYSTEM"."run": line 21 col 2 (at pos 821): [2048] (range 3): column store error:  [2048] "BETA_SYSTEM"."beta.procedures::selectSpadeData": line 33 col 4 (at pos 992): [2048] (range 3): column store error: search table error:  [34082] Execution of R script failed.;Error in file(file, ifelse(append, "a", "w")) :

  cannot open the connection

stack trace:

2: file(file, ifelse(append, "a", "w"))

1: write.table(spade_data, file = file, sep = " ", row.names = FALSE,

       quote = FALSE, col.names = FALSE)

 

 

CREATE PROCEDURE BETA_SYSTEM.spadeR (  IN spade_data "SPADE_INPUT_T",  OUT result "SPADE_RESULT_T"
)   LANGUAGE RLANG   AS                       
BEGIN  library(Matrix)  library(arules)  library(arulesSequences)  file <- tempfile()  write.table(spade_data, file = file, sep = " ", row.names=FALSE, quote = FALSE, col.names=FALSE)  df_trans <- read_baskets(file, info=c("sequenceID", "eventID", "SIZE"))  as(df_trans, "data.frame")  err_res <- tryCatch({   s_res <- cspade(df_trans, parameter = list(support = 0), control = list(verbose = TRUE))  }, warning= function(war) {     }, error=function(err) {     }, finally={     }  )  if(length(err_res) == 0){   result<-data.frame(sequence="EMPTY",support=0)  } else {   result <- as(s_res, "data.frame")  } 
END; 

Viewing all articles
Browse latest Browse all 6412

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>