Skip to content

This repository covers a 2.5 hour workshop highlighting the benefits and use cases for combining the use of SQL and Python

Notifications You must be signed in to change notification settings

ReDI-Aarhus/2025-Spring-DataAnalyticsAI-WS-CombineSQLPython

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

2025-Spring-DataAnalyticsAI-WS-CombineSQLPython

Repos for live workshop: Best of Both Worlds – Combining SQL & Python for Analytics
Location: ReDI-School Aarhus
Date: 2025-05-20 (May 20th, 2025)

Learning Objectives

By the end of the workshop, students will:

  • Understand how Python connects and interacts with SQL databases.
  • Know how to use Python to:
    • Run direct queries.
    • Call views, stored procedures, and functions.
    • Pass parameters to queries.
    • Work with result sets in pandas.
  • Understand performance and maintainability considerations.

Prerequisites

✅ What You’ll Need

🧩 Extensions to Install in VS Code

  • Python by Microsoft
  • SQL Server (mssql) by Microsoft



🗓 Combining SQL & Python Workshop Agenda

17:30–18:00 | Introduction & Setup

Ensure everyone has:

  • pyodbc, installed.
  • Connection string ready
  • Confirm ability to run a basic query using Python in VS Code
  • Quick review of how to use VS Code's Python and SQL extensions

18:00–18:15 | SQL vs Python: Strengths & Use Cases

Concepts:

  • What is SQL good at
  • What is Python good at
  • When to use both

18:15–18:30 | How Python Talks to SQL (Connection & Querying Basics)

Concepts:

  • Running simple queries

18:30–18:50 | Querying Tables, Views & Using Parameters

Concepts:

  • Using SQL views for abstraction
  • Parameterized queries with Python
  • Avoiding SQL injection and dynamic query pitfalls

18:50–19:10 | Calling Stored Procedures and Scalar Functions

Concepts:

  • Benefits of SQL stored procedures
  • How to use

19:10–19:30 | Combining Python Logic + SQL

Concepts:

  • Examples combining the two languages

19:30–19:50 | Challenge: Python app that inserts and reads from database table


19:50–20:00 | Wrap-up & What’s Next

  • Next steps:
    • Go home and reflect, then engage in Slack channel.
    • Practice site: sqlpad.io
  • Push all branches to GitHub

About

This repository covers a 2.5 hour workshop highlighting the benefits and use cases for combining the use of SQL and Python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages