cat ~/odp/app/etl/script/log/custom.log.20160117.sql |while read LINE; do wallet_stat_db -e “$LINE”; echo $LINE; wait; done
文件格式大概如下:
INSERT wallet_stat_db.t_custom_process_stat SET Walk_track=’P1101_EU1103V1001_P1103′, Process_id=’1′, Page_step=’1′, Order_type=’1′, Product_id=’4′, Customer_id=’27′, loss_type=’2′, app_code=’bdread’, Event_code=’EU1130′, Event_step=’1′, Error_code=’15500′, Error_cate=’981′, Act_date=’2016-01-17′, Total_cnt=1
INSERT wallet_stat_db.t_custom_process_stat SET Walk_track=’P1101_EU1103V1001_P1103′, Process_id=’1′, Page_step=’1′, Order_type=’1′, Product_id=’4′, Customer_id=’27′, loss_type=’2′, app_code=’bdread’, Event_code=’EU1130′, Event_step=’1′, Error_code=’41004′, Error_cate=’624′, Act_date=’2016-01-17′, Total_cnt=1