加载数据Load Data

LOAD DATA [LOCAL] INPATH path [OVERWRITE] INTO TABLE [db_name.]table_name [PARTITION part_spec]

part_spec:
    : (part_col_name1=val1, part_col_name2=val2, ...)

将数据从文件加载到表或表中的分区中。Load data from a file into a table or a partition in the table. 目标表不能是临时表。The target table must not be temporary. 当且仅当目标表已分区时,才必须提供分区规范。A partition spec must be provided if and only if the target table is partitioned.

备注

仅使用 Hive 格式创建的表支持此功能。This is supported only for tables created using the Hive format.

LOCAL

从本地文件系统加载路径。Load the path from the local file system. 否则,将使用默认文件系统。Otherwise, the default file system is used.

OVERWRITE

删除表中的现有数据。Delete existing data in the table. 否则,新数据将追加到该表中。Otherwise, new data is appended to the table.