具体语法如下
EXPORT TABLE tablename [PARTITION (part_column="value"[, ...])]
TO 'export_target_path' [ FOR replication('eventid') ]
IMPORT [[EXTERNAL] TABLE new_or_original_tablename [PARTITION (part_column="value"[, ...])]]
FROM 'source_path'
[LOCATION 'import_target_path']
例1 简单表的导入导出:
hive
use test1;
export table emp to '/user/hive/warehouse/exp_emp';
hdfs dfs -ls /user/hive/warehouse/exp_emp