Create Hive tables with headers and load quoted CSV data

Published on 27 November 2013 in - 1 minute read - Last modified on 06 March 2021 - Read in jp

Hue makes it easy to create Hive tables.

With HUE-1746, Hue guesses the columns names and types (int, string, float…) directly by looking at your data. If your data starts with a header, this one will automatically be used and skipped while creating the table.

Quoted CSV fields are also compatible thanks to HUE-1747.

Here is the data file used:

http://www.fdic.gov/bank/individual/failed/banklist.html

 

This is the SerDe for reading quoted CSV:

https://github.com/ogrodnek/csv-serde

 

And the command to switch the SerDe used by the table:

ALTER TABLE banks SET SERDE 'com.bizo.hive.serde.csv.CSVSerde'

Now go analyze the data with the Hive, Impala or Pig editors!


comments powered by Disqus

More recent stories

15 November 2021
Create SQL tables from excel files
Read More
21 September 2021
Access your data in ABFS without any credential keys!
Read More