Running a Python or R script from an SSIS package

PUBLISHED ON DEC 19, 2015

Prod is hard

It’s often said that new data scientists are surprised by how much time they spend doing data munging. I’d like to add that the excited chatter about the field heavily neglects how much attention needs to be paid to setting up and getting the infrastructure questions right.

Often, one needs to integrate R or Python-based ML into ETL environments and SSIS is a common data migration tool that’s used with SQL Server. Today we’ll briefly show how to integrate an R or Python script into SSIS.

Details

First, open up a new SSIS package in Visual Studio or SQL Server Data Tools

Note: I’m basing these instructions on this Youtube video.

Add the task

If you need to call a Python script from an SSIS package, one can use an Execute Process Task–drag that in.

Add task details

It’s as simple as adjusting the Executable and Arguments fields:

That’s it! If you’re running an R script, be sure to point the Executable field to your Rscript.exe file.