修改表的默认字符集: ALTER TABLE table_name DEFAULT CHARACTER SET character_name; 修改表字段的默认字符集: ALTER TABLE table_name CHANGE field field field_type CHARACTER SET character_name [other_attribute] 修改表的默认字符集和所有列的字符集: ALTER TABLE table_name CONVERT TO CHARACTER SE
背景:根据业务需要需要把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 + ".