使用FILE_FORMAT参数加载数据,file_list内所有文件均被按照同一种方式处理。
1. 加载GZIP格式文件,所有文件均按此类型处理,SNAPPY、LZO文件加载方法类似。
加载示例:
load data infile 'http://192.168.6.39/test.tbl.gz, http://192.168.6.39/test.tbl.gz001' into table test.t fields terminated by '|' file_format gzip;
2. 加载非压缩普通文本,所有文件均按此类型处理。
加载示例:
load data infile 'http://192.168.6.39/test.tbl, http://192.168.6.39/test.tbl.lzo' into table test.t fields terminated by '|' file_format uncompressed;
3. 按文件名后缀解析文件格式,所有文件均按此类型处理。
加载示例:
load data infile 'http://192.168.6.39/test.snappy, http://192.168.6.39/test.tbl' into table test.t fields terminated by '|' file_format undefined;