commit
Showing
4 changed files
with
4 additions
and
7 deletions
| 1 | use testdb; | 1 | use testdb; |
| 2 | 2 | ||
| 3 | INSERT INTO TABLE biz_data_count | 3 | INSERT OVERWRITE 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='com.ai.handler.plan.detail.index.info' | 6 | where method='com.ai.handler.plan.detail.index.info' | ... | ... |
| 1 | use testdb; | 1 | use testdb; |
| 2 | 2 | ||
| 3 | INSERT INTO TABLE biz_data_response | 3 | INSERT OVERWRITE 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='com.ai.handler.plan.detail.index.info'; | 6 | where method='com.ai.handler.plan.detail.index.info'; |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| 1 | use testdb; | 1 | use testdb; |
| 2 | truncate table qa_log; | 2 | |
| 3 | truncate table method_count; | ||
| 4 | truncate table biz_data_count; | ||
| 5 | truncate table biz_data_response; | ||
| 6 | LOAD DATA INPATH 'hdfs://localhost:8020/input/etl' OVERWRITE INTO TABLE qa_log; | 3 | 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 | ... | ... |
| 1 | use testdb; | 1 | use testdb; |
| 2 | 2 | ||
| 3 | INSERT INTO TABLE method_count | 3 | INSERT OVERWRITE TABLE method_count |
| 4 | select method,count(1) as count,max(timestamp) as timestamp | 4 | select method,count(1) as count,max(timestamp) as timestamp |
| 5 | from qa_log | 5 | from qa_log |
| 6 | group by method; | 6 | group by method; |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
-
Please register or sign in to post a comment