filmov
tv
How to Connect to SQL Server with Python | pyodbc Library | Quick Start
![preview_player](https://i.ytimg.com/vi/Vm2fHhP4SVE/maxresdefault.jpg)
Показать описание
This is a QUICK START guide for the pyobc Python library for those who use it to connect to Microsoft SQL SERVER.
The topics that I'll cover in this video include:
(1) Setting up a SQL connection string
(2) Create a SQL server database connection
(3) SELECT queries with a single parameter
(4) SELECT queries from multiple parameters
(5) INSERT rows from values
(6) INSERT multiple rows from an iterable object
(7) INSERT multiple rows from another query result
(8) Return table information as a list
(9) Return column information as list
Besides the standard query stuff you would expect... there are A LOT of other things that you can do with pyodbc, with some creativity. For example, you can use it to stage an ETL process...yes, you can execute a python script with a scheduled task on your computer... pretty cool. I often run queries in a FOR loop when I want to process data over multiple periods of time, but it is more efficient to load it in one month or one year increments. The sky is the limit! Enjoy!
The goal of this channel is to help you expand your analytics toolkit. If you find this content helpful, please make sure you hit that LIKE button and SUBSCRIBE to be notified of future videos.
The topics that I'll cover in this video include:
(1) Setting up a SQL connection string
(2) Create a SQL server database connection
(3) SELECT queries with a single parameter
(4) SELECT queries from multiple parameters
(5) INSERT rows from values
(6) INSERT multiple rows from an iterable object
(7) INSERT multiple rows from another query result
(8) Return table information as a list
(9) Return column information as list
Besides the standard query stuff you would expect... there are A LOT of other things that you can do with pyodbc, with some creativity. For example, you can use it to stage an ETL process...yes, you can execute a python script with a scheduled task on your computer... pretty cool. I often run queries in a FOR loop when I want to process data over multiple periods of time, but it is more efficient to load it in one month or one year increments. The sky is the limit! Enjoy!
The goal of this channel is to help you expand your analytics toolkit. If you find this content helpful, please make sure you hit that LIKE button and SUBSCRIBE to be notified of future videos.
Комментарии