when creating Hive table against csv saved in S3, do I absolutely have to order fields in the order of comma separated values for rows in csv?

橙三吉。 提交于 2020-01-17 01:47:05

问题


when creating Hive table against csv saved in S3, do I absolutely have to order fields in the order of comma separated values for rows in csv? the csv has the first row as header. I understand that csv is row based not columnar, but was wondering if there is a way to match the value of the header with the field name of the hive table and order columns differently.


回答1:


Yes, columns in the table definition (DDL) should be in the same order as in the underlying csv files. You can skip header from being selected using tblproperties("skip.header.line.count"="1").

See also Create Table manual.



来源:https://stackoverflow.com/questions/51959180/when-creating-hive-table-against-csv-saved-in-s3-do-i-absolutely-have-to-order

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!