Skip to content

Instantly share code, notes, and snippets.

View ammarmallik's full-sized avatar
💻

Ammar Akbar ammarmallik

💻
  • Lahore
  • 02:30 (UTC +05:00)
View GitHub Profile

Keybase proof

I hereby claim:

  • I am ammarmallik on github.
  • I am malikammarakbar (https://keybase.io/malikammarakbar) on keybase.
  • I have a public key whose fingerprint is 0DD4 8D22 7D96 B766 4556 8757 4C69 C44C 8AC6 C272

To claim this, I am signing this object:

@ammarmallik
ammarmallik / Redshift.py
Last active July 18, 2018 21:39
For Redshift connection
from sqlalchemy import create_engine, text
connection_string = "postgresql+psycopg2://%s:%s@%s:%s/%s" % ('admin','qh75dPL9GTCJ5ToEh79G','lifeprintstage.cbld5jqqok7d.us-east-1.redshift.amazonaws.com',str(5439),'lifeprintstage')
engine = create_engine(connection_string)
conn = engine.connect()
query = "SELECT * FROM `table`"
result = conn.execute(text(query))