Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

how to connect .sql data set to powerbi

import pandas as pd	
import pyodbc 
conn = pyodbc.connect('Driver={SQL Server};'
                     'Server=servername;'
                     'Database=databasename;'
                     'Trusted_Connection=yes;')
cur= conn.cursor()
sqlquery = pd.read_sql_query('SELECT * FROM tablename',conn)
print(sqlquery)
Source by hevodata.com #
 
PREVIOUS NEXT
Tagged: #connect #data #set #powerbi
ADD COMMENT
Topic
Name
7+8 =