Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

How to get regexp query to work?

Solved Go to solution
Highlighted

How to get regexp query to work?

Explorer

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;
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: How to get regexp query to work?

Super Mentor

@Cathy Liu

Do you have enough free memory on your sandbox/Virtual Box?

# free -m

.

If not then you might want to stop some of the services that you are not currently using like Zeppelin, Oozie, HBase and then see if it works without hanging.

View solution in original post

6 REPLIES 6
Highlighted

Re: How to get regexp query to work?

Super Mentor

@Cathy Liu

Do you have enough free memory on your sandbox/Virtual Box?

# free -m

.

If not then you might want to stop some of the services that you are not currently using like Zeppelin, Oozie, HBase and then see if it works without hanging.

View solution in original post

Highlighted

Re: How to get regexp query to work?

Explorer

Thank you so much, Jay! That is the exactly the issue.

Highlighted

Re: How to get regexp query to work?

Super Mentor

@Cathy Liu

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.

Highlighted

Re: How to get regexp query to work?

Explorer

Thanks for the tip. New to the community and that "Accept" link is pretty small and hidden. :D

Re: How to get regexp query to work?

Explorer

@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”.

Highlighted

Re: How to get regexp query to work?

Explorer

Problem resolved when I freed out the memory, but appreciate your tip.

Don't have an account?
Coming from Hortonworks? Activate your account here