mysql - How can I select certain rows that the key starts with a prefix in Hive? -


a simple question:

i wanted select rows keys have prefix in hive, somehow it's not working.

the queries i've tried:

select * solr_json_history dt='20170814' , hour='2147' , substr(`_root_`,1,9)='p10004232' limit 100;  select * solr_json_history dt='20170814' , hour='2147' , `_root_` 'p19746284%' limit 100;  

my hue editor hangs there without returning anything.

i've checked time range there's data in table query:

select * solr_json_history dt='20170814' , hour='2147' limit 15; 

it's returning 15 records expected.

any please?

thanks lot!

per @musafir-safwan's request, i've added answer here.

update: i'm not able provide sample data. problem got resolved.

thanks commentator's attention.

my table have data, no need worry that. checking though.

the problem due bad hue ui design, when issued above 2 queries, takes long (longer set timeout on ui) response back, simply, ui doesn't reply anything, or gives timeout reminder. hangs there.

also, 2 queries making 2 rpc calls, timed out. changed use below query:

select `_root_`,json, count(*) solr_json_history dt='20170814' , hour='2147' , substr(`_root_`,1,9)='p19746284' group `_root_`,json; 

the difference added count(*) turns query map-reduce job thing, no timeout limit, , returns result wanted.

ymmv.

thanks.


Comments

Popular posts from this blog

python Tkinter Capturing keyboard events save as one single string -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

javascript - Z-index in d3.js -