Support Questions

Find answers, ask questions, and share your expertise

How to get regexp query to work?

avatar
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

avatar
Master 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

avatar
Master 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.

avatar
Explorer

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

avatar
Master 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.

avatar
Explorer

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

avatar
Contributor

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

avatar
Explorer

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