Загрузка страницы

jupyter notebook extract data from sql server python data science

Source code:
!conda install -y -q pymssql
import pymssql
con = pymssql.connect(server='LAPTOP-CJ5ACQN6\SQLEXPRESS',user='gasUser',password='gasUser',database='AdventureWorksDW2017')
cursor = con.cursor()
query = "SELECT * FROM DimCustomer"
cursor.execute(query)
data = cursor.fetchall()
for item in data:
print(item)
con.close()

Would you like to support this channel? buy me a coffee :-) https://www.buymeacoffee.com/elearningnica

if you get the following error: "20009, b'DB-Lib error message 20009, severity 9:\nUnable to connect: Adaptive Server is unavailable or does not exist", then you have to make sure the tcp/ip protocol of your sql server instance is enabled, check the video for more details.

Github: https://github.com/elearningnica
Twitter: https://twitter.com/elearningnica
Facebook: http://facebook.com/elearningnica
Instagram: https://www.instagram.com/_elearningnica/
Telegram: https://t.me/elearningnica
YouTube: https://www.youtube.com/c/ElearningnicaBlogspot

Видео jupyter notebook extract data from sql server python data science канала elearningNica
Показать
Комментарии отсутствуют
Введите заголовок:

Введите адрес ссылки:

Введите адрес видео с YouTube:

Зарегистрируйтесь или войдите с
Информация о видео
10 июня 2020 г. 17:45:01
00:04:18
Яндекс.Метрика