Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

SQOOP IMPORT --map-column-hive ignored

avatar
Contributor

Hello guys,

 

I am using Scoop to transfer data from postgresql to hive usaing storage parquet.

 

I have a problem with the postgresql format "timestamp without time zone" which is mapped to BIGINT and becomes unsable for queriing.

I found the import option: --map-column-hive varname=type.

I have tried with the type:STRING and TIMESTAMP, both are ignored and I do not get any message about it.

 

Version used: SQOOP 1.4.6, Postgresql 9.4, CDH 5.8.

any idea is welcome.

20 REPLIES 20

avatar
New Contributor

Hi

 

below are some pointers just in case not tried  ( which I believe you using them )

  • set the column value to TIMESTAMP --  ( map-column-hive <cols_name>=TIMESTAMP) 
  • Then please keep in mind the column should be bigint

The main issue is the format. Parquet represent time in "msec" where as impala will interpret BigInt as "sec" so to get correct value you need to take care at query level. ( divide by 1000) 

 

Regards

Jay