Hive assignment1



0
Hive assignment1.

select * from nas_daily_price limit 50; is displaying records but where as i tried with below query getting NULL. why it's displaying null?

select stock_symbol, max(stock_price_close) from nas_daily_price group by stock_symbol;

Total MapReduce jobs = 1
Launching Job 1 out of 1
Number of reduce tasks not specified. Estimated from input data size: 1
In order to change the average load for a reducer (in bytes):
set hive.exec.reducers.bytes.per.reducer=
In order to limit the maximum number of reducers:
set hive.exec.reducers.max=
In order to set a constant number of reducers:
set mapred.reduce.tasks=
Starting Job = job_201512161916_0005, Tracking URL = http://0.0.0.0:50030/jobdetails.jsp?jobid=job_201512161916_0005
Kill Command = /usr/lib/hadoop/bin/hadoop job -kill job_201512161916_0005
Hadoop job information for Stage-1: number of mappers: 1; number of reducers: 1
2015-12-16 20:21:00,967 Stage-1 map = 0%, reduce = 0%
2015-12-16 20:21:07,004 Stage-1 map = 100%, reduce = 0%, Cumulative CPU 1.47 sec
2015-12-16 20:21:08,013 Stage-1 map = 100%, reduce = 0%, Cumulative CPU 1.47 sec
2015-12-16 20:21:09,021 Stage-1 map = 100%, reduce = 0%, Cumulative CPU 1.47 sec
2015-12-16 20:21:10,032 Stage-1 map = 100%, reduce = 0%, Cumulative CPU 1.47 sec
2015-12-16 20:21:11,045 Stage-1 map = 100%, reduce = 0%, Cumulative CPU 1.47 sec
2015-12-16 20:21:12,052 Stage-1 map = 100%, reduce = 0%, Cumulative CPU 1.47 sec
2015-12-16 20:21:13,068 Stage-1 map = 100%, reduce = 0%, Cumulative CPU 1.47 sec
2015-12-16 20:21:14,075 Stage-1 map = 100%, reduce = 0%, Cumulative CPU 1.47 sec
2015-12-16 20:21:15,088 Stage-1 map = 100%, reduce = 100%, Cumulative CPU 3.13 sec
2015-12-16 20:21:16,096 Stage-1 map = 100%, reduce = 100%, Cumulative CPU 3.13 sec
2015-12-16 20:21:17,108 Stage-1 map = 100%, reduce = 100%, Cumulative CPU 3.13 sec
2015-12-16 20:21:18,130 Stage-1 map = 100%, reduce = 100%, Cumulative CPU 3.13 sec
2015-12-16 20:21:19,139 Stage-1 map = 100%, reduce = 100%, Cumulative CPU 3.13 sec
MapReduce Total cumulative CPU time: 3 seconds 130 msec
Ended Job = job_201512161916_0005
MapReduce Jobs Launched:
Job 0: Map: 1 Reduce: 1 Cumulative CPU: 3.13 sec HDFS Read: 551179 HDFS Write: 6 SUCCESS
Total MapReduce CPU Time Spent: 3 seconds 130 msec
OK
NULL NULL
Time taken: 25.207 seconds

1 Answer(s)


0

hi Venkata,

check the table create definition and the way the data is loaded, Hive replaces empty value with "NULL"