MAPREDUCE服务 MRS-LOAD DATA:示例

时间:2024-11-28 01:44:18

示例

data.csv源文件数据如下所示:

ID,date,country,name,phonetype,serialname,salary
4,2014-01-21 00:00:00,xxx,aaa4,phone2435,ASD66902,15003
5,2014-01-22 00:00:00,xxx,aaa5,phone2441,ASD90633,15004
6,2014-03-07 00:00:00,xxx,aaa6,phone294,ASD59961,15005

CREATE TABLE carbontable(ID int, date Timestamp, country String, name String, phonetype String, serialname String,salary int) STORED AS carbondata;

LOAD DATA inpath 'hdfs://hacluster/tmp/data.csv' INTO table carbontable

options('DELIMITER'=',');

support.huaweicloud.com/cmpntguide-lts-mrs/mrs_01_1438.html