I am trying to run a sql query in the R tool.
But i get this error:
Info: R (6): no such table: XXXXXXXXX
My code in the R tool is:
library(sqldf)
the.data <- read.Alteryx("#1", mode="data.frame")
the.data1 <- sqldf("Select * From RMS.RMS_DXH_LATRON_DATA" )
write.Alteryx(the.data1, 1)
How do i execute sql queries in the R tool?
Solved! Go to Solution.
Hi @oonwuka,
Thanks for posting this question!
Honestly, I am not sure of the benefits of using sqldf inside R tool instead of Alteryx tools (select, filter, join, etc.)... but please find an example below:
In your code, you don't seem to connect sqldf query to the data loaded in the R tool (RMS.RMS_DXH_LATRON_DATA is not defined).
Thanks,
Paul Noirel
Sr Customer Support, Alteryx
It works...thanks
I needed to prove to our scientist that their native R scripts can be run (with as little modification as possible) in the R-tool