Hi, Does the INSERT clause have to include the OVERWRITE, which means that the new data will overwrite the previous data? How to implement the indeed INSERT operation, instead of OVERWRITE? BTW: How to implement the DELETE operator? thanks
afancy ------------------------------------------------------- hive> insert OVERWRITE table pagedim select 0, url, strToint('2'), 'domain', 'serversion' from downloadlog; Total MapReduce jobs = 2 Launching Job 1 out of 2 Number of reduce tasks is set to 0 since there's no reduce operator Starting Job = job_201011121525_0006, Tracking URL = http://localhost:50030/jobdetails.jsp?jobid=job_201011121525_0006 Kill Command = /home/xiliu/hadoop-0.20.2/bin/../bin/hadoop job -Dmapred.job.tracker=localhost:54311 -kill job_201011121525_0006 2010-11-18 09:55:52,155 Stage-1 map = 0%, reduce = 0% 2010-11-18 09:55:55,169 Stage-1 map = 100%, reduce = 0% 2010-11-18 09:55:58,200 Stage-1 map = 100%, reduce = 100% Ended Job = job_201011121525_0006 Ended Job = 487027960, job is filtered out (removed at runtime). Launching Job 2 out of 2 Number of reduce tasks is set to 0 since there's no reduce operator Starting Job = job_201011121525_0007, Tracking URL = http://localhost:50030/jobdetails.jsp?jobid=job_201011121525_0007 Kill Command = /home/xiliu/hadoop-0.20.2/bin/../bin/hadoop job -Dmapred.job.tracker=localhost:54311 -kill job_201011121525_0007 2010-11-18 09:56:04,701 Stage-2 map = 0%, reduce = 0% 2010-11-18 09:56:07,723 Stage-2 map = 100%, reduce = 0% 2010-11-18 09:56:10,751 Stage-2 map = 100%, reduce = 100% Ended Job = job_201011121525_0007 Loading data to table pagedim 1000 Rows loaded to pagedim OK Time taken: 23.194 seconds hive> insert table pagedim select 0, url, strToint('2'), 'domain', 'serversion' from downloadlog; FAILED: Parse Error: line 1:7 mismatched input 'table' expecting OVERWRITE in insert clause