Skip to content

edfreeman/PySQL_Examples

Repository files navigation

PySQL_Examples

Brief description

A number of examples of using the inline Python capability in SQL Server 2017.

Less brief description

This repo contains multiple examples of SQL queries which invoke Python code using the 'sp_execute_external_script' system stored procedure, along with a folder that contains the packaged python files which needs to be placed inside a path that SQL can see to work properly.

There are 3 separate examples included, which are:

  • DaysOfWeekExample - Map the day number (1-7) to the day of the week (Mon-Sun) (based on the example found at https://docs.microsoft.com/en-us/sql/advanced-analytics/tutorials/run-python-using-t-sql. Couldn't find any related specific licences, so the license agreement is in accordance with that of the Microsoft docs.)
  • GenerateRandomNumbersExample - Generate a list of random numbers (Created myself, please refer to license file)
  • ListCalculationsExample - Output the mean, min and max of a list (Created myself, please refer to license file)

More details are in the individual READMEs inside each folder.

Useful links:

About

A number of examples of using the inline Python capability in SQL Server 2017.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages