Created
November 25, 2015 07:10
-
-
Save dmitryhd/8b52607b8698304cd3d7 to your computer and use it in GitHub Desktop.
Python various db connections
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Postgres | |
| from sqlalchemy import create_engine | |
| engine = create_engine('postgresql://USER:PASS@HOST/') | |
| engine.execute('select 1').fetchall() | |
| # Vertica | |
| import pyodbc | |
| conn_string = 'DSN=Vertica;' | |
| con = pyodbc.connect(conn_string) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment