Alteryx Server Discussions

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

Run SQL files via Scheduler

bjschwartz3
Astéroïde

I have a ton of old legacy SQL files that I would like to run via Alteryx Scheduler. I rather not remake the file or convert it to Alteryx. I just want Alteryx to run multiple SQL files in succession. Any suggestions on best practices for running multiple SQL files in order via server scheduler? 

2 RÉPONSES 2
hroderick-thr
Bolide

Most or all databases allow scripts to run from command line.

For example SQL Server has its sqlcmd that's used for it.

 

Get your scripts running from command line bat file.

Use Alteryx Run Command tool to run the bat files.

hroderick-thr
Bolide

p.s. to the reply above:

 

If you can't use the database's command line tool like sqlcmd, you can write a python program that reads and runs the sql command. Then run the python from Alteryx Run Command tool.