Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
impla odbc conect sapmle by python
#!/usr/bin/python
# -*- coding:utf-8 -*-
import pyodbc
def main():
con=pyodbc.connect('DSN=IMPALA-SERVER;UID=;PWD=;Database=Default;')
cursor=con.cursor()
sql='select count(*) from sample_07'
cursor.execute(sql)
for r in cursor.fetchall():
print r
con.close()
if __name__=='__main__':main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.