Hi all,
I am currently investigating whether it is possible to extract data from Adobe Analytics using the R tool in Alteryx. I have managed to pull the data through RStudio but when I drop my code into the Alteryx Rtool I keep getting an error saying: Only atomic vectors of length 1 or data frames with 1 row can be unboxed. Has anyone ever had this issue before?
Any help would be appreciated!
Cheers,
Gillian
Solved! Go to Solution.
Gillian
i think wrrting R code in Altreryx diffrent (little) than R studio
if you see this error while Wrting to R tool output then you need to modify your code wtitten in R Sudio little
Take a look at some of R code Written in Alteryx for the predictive tools as Macro and see how they have configured the output from the R script
Just Right click on anyone of Predictive tools and open macro
Thanks I will have a look into this.
What is the class of the object you are trying to output in Alteryx?
Are you familiar with the RSiteCatalyst package that has some functionality to interact with Adobe Analytics?
https://cran.r-project.org/web/packages/RSiteCatalyst/index.html
I am using the R connector from Developer and connecting it a browse sa the output at the moment. Ideally I would like to connect it to Data Stream In from In-Database and upload some tables in Impala.
I have been using the RSiteCatalyst in RStudio and it is working well but when I use the same code in the R tool in alteryx I keep getting errors and I don't understand why
So, I presume your final line of code is something like
write.Alteryx(x, 1)
Can you run
str(x)
and share any details that are not confidential.
So, I traced the error the unbox function in jsonlite. A simple fix seems to be converting the date.from and date.to variables to character using as.character, before passing it on to QueueTrended. I tested it and it works for me. I have attached the fixed R code here. I have highlighted the lines I have modified using a #<---- marker at the end of the line.
Let me know if it works for you now.
That works perfectly!! thank you so much for all your help