Running Python and/or R code?
Ricardo_22136
New Altair Community Member
Hi everyone,
I was wondering if there is any way to run Python and/or R code in either Data Prep Studio 15.0.0, Automator 15.0.0 or Monarch 15.1?
Currently the process for preparing the data is a mix of datawatch processes and Python/R scripts but this means I am usually unable to fully automate the process. I was wondering if there is a way to integrate that code into a workspace or the server so the process is fully automated?
Any help is appreciated.
Thanks,
------------------------------
Ricardo Cao
------------------------------
I was wondering if there is any way to run Python and/or R code in either Data Prep Studio 15.0.0, Automator 15.0.0 or Monarch 15.1?
Currently the process for preparing the data is a mix of datawatch processes and Python/R scripts but this means I am usually unable to fully automate the process. I was wondering if there is a way to integrate that code into a workspace or the server so the process is fully automated?
Any help is appreciated.
Thanks,
------------------------------
Ricardo Cao
------------------------------
0
Answers
-
Hi Ricardo,
Would it be possible to call the Python executable and pass it a .py file as a parameter? If so, a vb.net script in Automator should do the job.
I've not tried it with Python, but the following works with a command line OCR tool.Dim p1 As New ProcessStartInfo("C:\AbbyyAPI\AbbyyAPI.exe") p1.Arguments = """C:\AbbyyAPI\Small.xml""" Timeout = 3600000 Dim PWait1 As Process PWait1 = Process.Start(p1) PWait1.WaitForExit(Timeout) If PWait1.HasExited = False Then PWait1.Kill() Else End If
This also has a timeout. If you don't need it, I believe the last 8 lines of code could be replaced with Process.Start(P1)
By default, the executable will run under the credentials that are being used for the Datawatch Agent service. It is possible to impersonate another user, if required.
The executable must run "silently". If it spawns any interactive prompts, then the script will invisibly hang as it waits for user interaction.
Regards,
Steve.
------------------------------
Steve Caiels
Professional Service
Datawatch Corporation
+44 203 868 0253
------------------------------
-------------------------------------------
Original Message:
Sent: 01-22-2019 01:41 PM
From: Ricardo Cao
Subject: Running Python and/or R code?
Hi everyone,
I was wondering if there is any way to run Python and/or R code in either Data Prep Studio 15.0.0, Automator 15.0.0 or Monarch 15.1?
Currently the process for preparing the data is a mix of datawatch processes and Python/R scripts but this means I am usually unable to fully automate the process. I was wondering if there is a way to integrate that code into a workspace or the server so the process is fully automated?
Any help is appreciated.
Thanks,
------------------------------
Ricardo Cao
------------------------------"0