We’re going to use the Pandas plugin to format our data to make it easier to read. If you’ve already used pip to install PRAW then this is going to be very easy. Let’s get started.
First of all we need to find our Python scripts folder. My default on SQL 2019 is here.
C:\Program Files\Microsoft SQL Server\MSSQL15.SQL2019PYTHON\PYTHON_SERVICES\Scripts
Once here, open the command line to this location and run
1 |
pip install praw |
This is going to do the heavy lifting for you. You’ll just sit there and watch it install.
Once the script has finished you’ll see a screen like this.

To double check this has worked you can run the following command within SQL Server
1 2 3 4 5 |
DECLARE @sql nvarchar(max) = N'#! usr/bin/env python3 import pandas as pd' EXEC sp_execute_external_script @language = N'Python', @script = @sql |
If you see an error then you’ll have to try and reinstall Pandas. If not, congratulations, you’ve done it!