数据结构:
Hello^AWorld
Hello^AWorld
Hello^AWorld
Hello^AWorld
Hello^AWorld
Hello^AWorld
Hello^AWorld
创建表语句:
create table if not EXISTS helloworld(Hello string, World string)
row format delimited
fields terminated by '\001'
lines terminated by '\n'
STORED AS TextFile;
LOAD DATA LOCAL INPATH '/opt/data_test/HelloWorld.txt' OVERWRITE INTO TABLE helloworld;
测试结果:
Hello World
Hello World
Hello World
Hello World
Hello World
Hello World
Hello World
Hello World
Hello World
Hello World
Hello World