Skip to content

Instantly share code, notes, and snippets.

@shibacow
Created May 4, 2013 10:54
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save shibacow/5517142 to your computer and use it in GitHub Desktop.
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