Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import pyodbc
- import pandas as pd
- # Setup the ODBC connection to the Dremio instance
- user_id = 'george'
- user_password = 'dem0passwd'
- cnxn = pyodbc.connect(r"DSN=Dremio Connector;UID={user};PWD={pwd}".format(user=user_id, pwd=user_password), autocommit=True)
- # SQL style query to retrive the required data from Dremio
- sql = r'SELECT "Date", "Time" FROM "@george".some_game'
- # Executing the query using the alredy open ODBC connection
- test_data = pd.read_sql(sql, cnxn)
- # Disaplying the top 5 rows from the retrieved dataset
- test_data.head()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement