일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- Github
- Tkinter
- string
- dataframe
- math
- Google Excel
- numpy
- Excel
- c#
- GIT
- Mac
- Google Spreadsheet
- array
- gas
- django
- PySpark
- PANDAS
- 파이썬
- Python
- hive
- Apache
- Kotlin
- Redshift
- matplotlib
- google apps script
- PostgreSQL
- Java
- SQL
- list
- Today
- Total
목록S3 (5)
달나라 노트
Redshift -> S3 -- Redshift -> S3 unload (' ----- (S3 server에 올릴 data를 추출하는 query) select item_id , item_name , price from test_table -- where valid in (''valid'') ----- (쿼리가 따옴표로 감싸져있기때문에 따옴표 2개로 string을 감싸야함.) ') to 's3://items/price_info/' ----- (unload 속에 적힌 query 결과가 저장될 s3 server의 경로) iam_role 'credential' ----- (s3 server에 로그인하기 위한 credential) manifest ----- (manifest format으로 저장) delimite..
Redshift -> S3 -- Redshift -> S3 unload(' ----- (S3 server에 올릴 data를 추출하는 query) select col1 , col2 from test_table_1 -- where col3 in (''valid'') ----- (쿼리 전체가 따옴표로 감싸져있기 때문에 쿼리 내부의 문자는 따옴표 2개로 string을 감싸야함.) ') to 's3://root_dir/test_dir/' ----- (unload 속에 적힌 query 결과가 저장될 s3 server의 경로) iam_role 'credentials' ----- (s3 server에 로그인하기 위한 credential) csv ----- (csv format으로 저장) delimiter ',' ---..
- S3를 이용하는 구문들에 대한 설명은 아래 링크 참조 S3 server에 data 올리기 (csv format) = https://cosmosproject.tistory.com/176 Redshift : unload & copy (s3 서버에 query 결과 upload하기, s3서버에서 파일 불러와 database table 만들기. CSV redshift의 unload 구문은 query결과를 s3 서버에 파일의 형식으로 업로드할 수 있게 해줍니다. copy 구문은 반대로 s3 서버에 있는 파일을 불러와 database 내의 table로 만들 수 있도록 해줍니다. 예시를 보 cosmosproject.tistory.com 이번에는 parquet format을 이용해서 Redshift, Hive등의 d..
spark dataframe은 table에 삽입될 수도 있지만 AWS s3 server에 upload될 수도 있습니다. from pyspark.sql import SparkSession spark = SparkSession.builder\ # 1 .appName('Test_runner')\ .config('hive.mapred.mode', 'nonstrict')\ .config('hive.exec.dynamic.partition', 'true')\ .config('hive.exec.dynamic.partition.mode', 'nonstrict')\ .config('hive.exec.parallel', 'true')\ .config('hive.stats.fetch.column.stats', 'true')..