https://chanchanhome.tistory.com/44
https://medium.com/@ian.nam.kr/apache-presto-benchmark-b726b6283e0e
https://support.treasuredata.com/hc/en-us/articles/360000708727-Presto-JDBC-Connection
https://hub.docker.com/r/starburstdata/presto/
https://github.com/1900/presto-spring-boot-starter
https://inventa.live/artifactory/gradle-release/com/facebook/presto/presto-kudu/
CREATE TABLE orders ( orderkey bigint, custkey bigint, orderstatus varchar(1), totalprice double, orderdate date, orderpriority varchar(15), clerk varchar(15), shippriority integer, comment varchar(79) ) WITH ( external_location = 's3://my_bucket/path/to/folder', format = 'ORC' -- or 'PARQUET' );
https://stackoverflow.com/questions/53392430/correct-way-to-restart-presto-server-service-on-emr
https://stackoverflow.com/questions/27867158/presto-query-no-worker-nodes-available
insert into hive.default.tbl_adobe_data (visits) select visits from mysql.insight.tbl_adobe_data;
https://blog.wisen.co.kr/?p=11295
https://docs.aws.amazon.com/ko_kr/emr/latest/ReleaseGuide/presto-adding-db-connectors.html
https://stackoverflow.com/questions/53392430/correct-way-to-restart-presto-server-service-on-emr
https://github.com/prestodb/presto/issues/7432
* Mysql 설정
sudo vi /etc/presto/conf/catalog/mysql.properties
connector.name=mysql
connection-url=jdbc:mysql://dataview.cangewyjzrdn.ap-northeast-1.rds.amazonaws.com:3306
connection-user=mm
connection-password=442423!!f
* 설정은 모든 노드(마스터+슬레이브) 포함
ssh -i ~/.ssh/zeliter.pem hadoop@ec2-18-182-48-214.ap-northeast-1.compute.amazonaws.com
ssh -i ~/.ssh/zeliter.pem hadoop@ec2-52-194-239-82.ap-northeast-1.compute.amazonaws.com
ssh -i ~/.ssh/zeliter.pem hadoop@ec2-13-231-141-26.ap-northeast-1.compute.amazonaws.com
sudo restart presto-server
presto-cli
* 설정 후 확인
select * from mysql.zeliter.review limit 10;
CREATE EXTERNAL TABLE member_review (
member_id STRING,
review_desc STRING
)
STORED AS PARQUET
LOCATION 's3://newzeliter2/review/parquet';
insert into hive.default.member_review (member_id, review_desc) select cast(member_id as varchar(100)), content from mysql.zeliter.review;
select * from hive.default.member_review limit 10;
* CSV 및 S3 를 통한 테이블 생성
Then you can such table in Presto Hive connector with:
CREATE TABLE hive.default.csv_table_with_custom_parameters ( c_bigint varchar, c_varchar varchar) WITH ( csv_escape = '', csv_quote = '', csv_separator = U&'\0001', -- to pass unicode character external_location = 'hdfs://hadoop/datacsv_table_with_custom_parameters', format = 'CSV')
In your case it would be:
CREATE TABLE hive.default.csv_table_with_custom_parameters ( PassengerId int, Survived int, Pclass int, Name string, Sex string, Age int, SibSp int, Parch int, Ticket int, Fare double, Cabin string, Embarked string) WITH ( csv_escape = '\', csv_quote = '"', csv_separator = ',', external_location = 's3://my_bucket/titanic_train/', format = 'CSV')
'BigData' 카테고리의 다른 글
Mysql Json (0) | 2019.09.06 |
---|---|
ORC와 Parquet 파일 저장 형식 (0) | 2019.08.26 |
Airflow & K8s (0) | 2019.08.21 |
CQRS & Event Sourcing (0) | 2019.08.08 |
Apache Oozie (0) | 2019.08.05 |