commit
Showing
3 changed files
with
5 additions
and
2 deletions
| 1 | use testdb; | 1 | use testdb; |
| 2 | 2 | ||
| 3 | INSERT OVERWRITE TABLE biz_data_count | 3 | INSERT INTO TABLE biz_data_count |
| 4 | select method,biz_data,count(1) as count,max(timestamp) as timestamp | 4 | select method,biz_data,count(1) as count,max(timestamp) as timestamp |
| 5 | from qa_log | 5 | from qa_log |
| 6 | where method is not null and method!='N/A' and method='${hivevar:mytemp}' | 6 | where method is not null and method!='N/A' and method='${hivevar:mytemp}' | ... | ... |
| 1 | use testdb; | 1 | use testdb; |
| 2 | 2 | ||
| 3 | INSERT OVERWRITE TABLE biz_data_response | 3 | INSERT INTO TABLE biz_data_response |
| 4 | select method,biz_data,uid,timestamp,response | 4 | select method,biz_data,uid,timestamp,response |
| 5 | from qa_log | 5 | from qa_log |
| 6 | where method is not null and method!='N/A' and method='${hivevar:mytemp}'; | 6 | where method is not null and method!='N/A' and method='${hivevar:mytemp}'; |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| 1 | use testdb; | 1 | use testdb; |
| 2 | 2 | ||
| 3 | truncate table biz_data_count; | ||
| 4 | truncate table biz_data_response; | ||
| 5 | |||
| 3 | LOAD DATA INPATH 'hdfs://localhost:8020/input/etl' OVERWRITE INTO TABLE qa_log; | 6 | LOAD DATA INPATH 'hdfs://localhost:8020/input/etl' OVERWRITE INTO TABLE qa_log; |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
-
Please register or sign in to post a comment