FAILED: ParseException line 1:65 cannot recognize input near 'row' 'formatted' 'delimited' in table row format specification
hive报FAILED: ParseException line 1:65 cannot recognize input near 'row' 'formatted' 'delimited' in table row format specification
1 2 3 4 | 错误语句: insert overwrite local directory '/home/ljpbd/datas/student' row formatted delimited fields terminated by '\t' select id, name from student; 正确语句: insert overwrite local directory '/home/ljpbd/datas/student' row format delimited fields terminated by '\t' select id, name from student; |
1 2 3 4 5 6 7 | 正确语法: INSERT OVERWRITE [ LOCAL ] DIRECTORY directory [ROW FORMAT row_format] [STORED AS file_format] select_statement; <strong>注意事项:保存的文件夹中不可有其他文件,会被清空;</strong> 例子:可以将数据保存成json格式 insert overwrite local directory '/opt/module/datas/student' ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.JsonSerDe' select id, name from student;<br>输出格式:<br>{ "_col0" :1001, "_col1" : "student1" }<br>{ "_col0" :1002, "_col1" : "student2" }<br>{ "_col0" :1003, "_col1" : "student3" }<br>{ "_col0" :1004, "_col1" : "student4" }<br>{ "_col0" :1005, "_col1" : "student5" }<br>{ "_col0" :1006, "_col1" : "student6" }<br>{ "_col0" :1007, "_col1" : "student7" }<br>{ "_col0" :1008, "_col1" : "student8" }<br>{ "_col0" :1009, "_col1" : "student9" }<br><br> |
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· Manus的开源复刻OpenManus初探
· AI 智能体引爆开源社区「GitHub 热点速览」
· 从HTTP原因短语缺失研究HTTP/2和HTTP/3的设计差异
· 三行代码完成国际化适配,妙~啊~