Exporting Hive Table to a S3 bucket

后端 未结 3 1194
无人及你
无人及你 2020-12-29 05:29

I\'ve created a Hive Table through an Elastic MapReduce interactive session and populated it from a CSV file like this:

CREATE TABLE csvimport(id BIGINT, tim         


        
3条回答
  •  清歌不尽
    2020-12-29 06:21

    If you could access aws console and have the "Access Key Id" and "Secret Access Key" for your account

    You can try this too..

    CREATE TABLE csvexport(id BIGINT, time STRING, log STRING)
    ROW FORMAT DELIMITED
    FIELDS TERMINATED BY '\t'
    LOCATION 's3n://"access id":"secret key"@bucket/folder/path';
    

    Now insert the data as other stated above..

    INSERT OVERWRITE TABLE csvexport select id, time, log from csvimport;
    

提交回复
热议问题