- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Value in Date Column is NULL in HIVE
- Labels:
-
Apache Hive
-
Apache Pig
Created on 09-04-2015 05:51 AM - edited 09-16-2022 02:39 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Created 09-05-2015 08:44 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Created 09-05-2015 08:44 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Created 09-06-2015 06:12 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Congratulations on finding the solution. Thank you for sharing it in case others run across the same issue. 🙂
Cy Jervis, Manager, Community Program
Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.
