背景:根据业务需要需要把60张主子表批量入库到hive表. 创建测试数据: def createBatchTestFile(): Unit = { to ) { val sWriter = new PrintWriter(new File("D:\\server_" + layer + ".txt")) val nWriter = new PrintWriter(new File("D:\\neighour_" + layer + ".
一.Hive客户端:根据数据源不同划分 1.从本地文件系统中导入数据到hive表中: load data local inpath "path" [OVERWRITE] into table tablename; 2.从HDFS上导入数据到hive表中: load data inpath "path" [OVERWRITE] into table tablename; 3.从别的表查询出来的数据导入到hive表中: insert overwrite table ta