Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

Value in Date Column is NULL in HIVE

avatar
Explorer

Hi,

        I have date column in PIG. I have converted the date column from string to Date using "ToDate" function in PIG. However, when I am trying to

import that data in HIVE, I am getting NULL values. I have checked the date format in PIG and HIVE they are different.

 

So is their any way to make the date format same in PIG and HIVE. Or what could be the other way to store the Date into HIVE.

 

My date format in text file is : 2014 10 15 17:10:13.728

 

Let me know if any further information is required from my side.

 

Regards,

Neeraj

1 ACCEPTED SOLUTION

avatar
Explorer

I Have found the solution.

 

I have converted the string in desired format (which hive requires (yyyy-MM-dd HH:mm:ss)) and then imported that formatted

string into HIVE and it works pretty well.

 

Regards,

Neeraj

 

View solution in original post

2 REPLIES 2

avatar
Explorer

I Have found the solution.

 

I have converted the string in desired format (which hive requires (yyyy-MM-dd HH:mm:ss)) and then imported that formatted

string into HIVE and it works pretty well.

 

Regards,

Neeraj

 

avatar
Community Manager

Congratulations on finding the solution. Thank you for sharing it in case others run across the same issue. 🙂


Keep the questions coming,

Cy Jervis | Senior Manager, Knowledge Programs

if (helpful) { mark_as_solution(); } | if (appreciated) { give_kudos(); }