반응형
Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
Tags
- PySpark
- hive
- GIT
- list
- google apps script
- Python
- PANDAS
- Excel
- Java
- dataframe
- Google Excel
- Redshift
- string
- SQL
- django
- Apache
- 파이썬
- Kotlin
- numpy
- PostgreSQL
- Google Spreadsheet
- Github
- Mac
- Tkinter
- matplotlib
- math
- gas
- c#
- array
Archives
- Today
- Total
목록Run query (1)
달나라 노트
Python psycopg2 : access redshift and run query using python, python으로 redshift에서 쿼리 돌리기
import psycopg2 import pandas as pd def query_runner(query): dbname = 'sandbox' host = 'test_host' port = 1111 # port_number user_id = 'redshift_user_id' password = 'redshift_user_name' connection_info = "dbname='{}' host='{}' port={} user='{}' password='{}'".format(dbname, host, port, user_id, password) connection = psycopg2.connect(connection_info) cursor = connection.cursor() cursor.execute(q..
Python/Python ETC
2020. 12. 23. 00:20