Type conversion pig hcatalog
Asked Answered
C

3

6

I use HCatalog version 0.4. I have a table in hive 'abc' which has a column with datatype 'timestamp'. When i try to run a pig script like this "raw_data = load 'abc' using org.apache.hcatalog.pig.HCatLoader();" i get an error saying "java.lang.TypeNotPresentException: Type timestamp not present".

Commandeer answered 20/2, 2014 at 0:41 Comment(0)
L
4

The problem is that hcatalog doesn’t support timestamp type. It will be supported under hive 0.13, they have an issue about this problem that was already solved, you can see the issue in https://issues.apache.org/jira/browse/HIVE-5814

Labourite answered 5/3, 2014 at 9:31 Comment(0)
P
1

If you use Hive-Hcatalog 0.13.0 check path to HCatLoader, you must use org.apache.hive.hcatalog.pig.HCatLoader() instead org.apache.hcatalog.pig.HCatLoader()

Polyclinic answered 29/1, 2015 at 13:32 Comment(0)
S
0

Hive 0.13 has Timestamp data type. But there will be data loss when using HCatLoader.

But Hive - > Pig will using HCat Loader, the nanoseconds will be lost from timestamp.

Pig - > Hive using HCat Storer. Translates based on Timestamp using milli seconds.

Reference:

https://cwiki.apache.org/confluence/display/Hive/HCatalog+LoadStore#HCatalogLoadStore-TypesinHive0.13.0andLater.1

Steelhead answered 17/1, 2015 at 5:8 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.