Skip to content

Instantly share code, notes, and snippets.

@cjjavellana
Last active April 20, 2016 16:10
Show Gist options
  • Save cjjavellana/fdd7a24b20157cbecbc9 to your computer and use it in GitHub Desktop.
Save cjjavellana/fdd7a24b20157cbecbc9 to your computer and use it in GitHub Desktop.
Anything hadoop

Download Serde jar from here

https://github.com/downloads/IllyaYalovyy/csv-serde/csv-serde-0.9.1.jar

Create table in hive (with optionally enclosed by quotes data)

hive> add jar /opt/hive-2.0.0/testdata/csv-serde-0.9.1.jar
hive> create external table employee (userid int, date_added date, name string, last_name string) row format serde 'com.bizo.hive.serde.csv.CSVSerde' with serdeproperties ("separatorChar"=",","quoteChar"=""") stored as textfile;

Hive is not allowed to impersonate

Change hive.server2.enable.doAs to false in hive-site.xml

Appt

s_rpts5vjz2l0lbe9_fname.pdf?dl=0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment