Mamun
Mamun

Reputation: 2544

Hive will not recognize column name in the 2nd condition in the query

I ran the following and query and got the following error. Please see that error message mentions the column name (platform) that it thinks is not there. weird.

hive -S -e 'select * from devices.device_app_action where ds= '20160511' 
AND platform= 'ios' limit 3;'

FAILED: SemanticException [Error 10004]: Line 1:73 Invalid table alias or column reference 'ios': (possible column names are: duid, id, dt, app, platform, app_level, tier1, tier2, tier3, tier4, tier5, tier6, first_geo, first_v, first_lang, total_events, min_ats, max_ats, ds)

Its telling me the column platform does not exist and its there in the list

Upvotes: 1

Views: 672

Answers (1)

ScaisEdge
ScaisEdge

Reputation: 133400

could be you have to enclose the query in proper quotes

'select * from devices.device_app_action where ds= "20160511" AND platform= "ios" limit 3;'

Upvotes: 2

Related Questions