Created
July 20, 2020 21:30
-
-
Save vsdsantos/309478d170d159ba2a8383f97c8b2c30 to your computer and use it in GitHub Desktop.
This file contains 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
import csv | |
import psycopg2 | |
from psycopg2.extras import execute_batch | |
host = '' | |
port = '' | |
db = '' | |
user = '' | |
password = '' | |
conn = psycopg2.connect(host=host, port=port, dbname=db, user=user, password=password) | |
cur = conn.cursor() | |
cur.execute('SELECT * FROM tb_search_keywords;') | |
cur.fetchone() | |
cur.close() | |
conn.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment