hive export import命令

时间:2023-03-08 16:17:56
 EXPORT TABLE stu_p TO '/stu_p.dat'; 将数据和元数据导出到hdfs hdfs dfs -ls /stu_p.dat/year=
导入表(必须明白导出表,导出表是将表的元数据,数据导出到hdfs上.)讲一个导出的表导入到数据库中,这个hdfs_path 是一个导出表的文件夹
import table tbname from ‘hdfs_path’
、导入作为一个外部表
export table department to 'hdfs_exports_location/department';
import external table department from 'hdfs_exports_location/department';