EXPORT command exports the data of a table or partition, along with the metadata, into a specified output location. This output location can then be moved over to a different Hadoop or Hive instance and imported from there with the
When exporting a partitioned table, the original data may be located in different HDFS locations. The ability to export/import a subset of the partition is also supported.
Exported metadata is stored in the target directory, and data files are stored in subdirectories.
IMPORT commands work independently of the source and target metastore DBMS used; for example, they can be used between Derby and MySQL databases.
Simple export and import:
Rename table on import:
Export partition and import:
Export table and import partition:
Specify the import location:
Import as an external table: