- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
How to get regexp query to work?
- Labels:
-
Apache Hive
Created 03-25-2018 11:03 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am following https://hortonworks.com/tutorial/how-to-process-data-with-apache-hive/ using Hive View 2.0. I copied the exact query, running on Virtual Box (see the query commend below); however, the query keeps hanging. Anyone else has the same issue?
insert overwrite table drivers
SELECT
regexp_extract(col_value,'^(?:([^,]*),?){1}',1) driverId,
regexp_extract(col_value,'^(?:([^,]*),?){2}',1) name,
regexp_extract(col_value,'^(?:([^,]*),?){3}',1) ssn,
regexp_extract(col_value,'^(?:([^,]*),?){4}',1) location,
regexp_extract(col_value,'^(?:([^,]*),?){5}',1) certified,
regexp_extract(col_value,'^(?:([^,]*),?){6}',1) wageplan
from temp_drivers;
Created 03-25-2018 11:19 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Created 03-25-2018 11:19 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Created 03-26-2018 12:08 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you so much, Jay! That is the exactly the issue.
Created 03-26-2018 12:42 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If this resolved your query then please mark this HCC thread as answered by clicking on "Accept" link on the correct answer, That way it will help other HCC users to quickly find the answers.
Created 03-26-2018 03:07 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the tip. New to the community and that "Accept" link is pretty small and hidden. 😄
Created 03-26-2018 07:41 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Cathy Liu
If you continue to encounter issues with long running Hive queries please take a look at "Appendix B: Troubleshoot" of “Learning the Ropes of the HDP Sandbox”.
Created 03-27-2018 03:17 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Problem resolved when I freed out the memory, but appreciate your tip.
