Alteryx Designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.

Connect R Scripts with Alteryx

jessodel
5 - Atom

Hi everyone,

 

I have a couple hundred of R Scripts written with R Programming that is saved in a designated folder. Is there a way for Alteryx to "call" these scripts based on a condition (e.g. script name). Basically, we do not want to rewrite all the R script using Alteryx since there are a lot of scripts. 

 

Thank you.

3 REPLIES 3
BenMoss
ACE Emeritus
ACE Emeritus

Hi!

 

Yes, sure you can do this; you can do this using the 'events' tab, or the 'run command' tool within Alteryx.

 

The events tab would allow you to run the script prior to, or after, your workflow has ran; whilst the 'run command' option allows you to run the scripts in the middle of a workflow process.

 

I would then look at how you can execute a script through a batch file, which you can then reference directly in the events tool, as in the image below.

 

https://stackoverflow.com/questions/6788928/how-to-run-a-r-language-r-file-using-batch-file

 

I hope this gives you some direction; the idea of creating a .bat file to trigger all of your files sounds like a cumbersome task, but it's something you could generate using Alteryx as a first step, and then look at executing them using the aforementioned methods.

 

2019-04-24_22-30-28.png

 

Ben

 

 

jessodel
5 - Atom

Thanks, Ben! We will try this out. 

kp10
6 - Meteoroid

Is their a way to do this using R code. Like using source command to connect an R script?

Labels