commit
Showing
4 changed files
with
62 additions
and
2 deletions
| 1 | use testdb; | 1 | use testdb; |
| 2 | 2 | ||
| 3 | INSERT OVERWRITE 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,platform,deviceInfo,version,imei,app_id,timestamp,response |
| 5 | from qa_log | 5 | from qa_log |
| 6 | where method is not null and method!='N/A'; | 6 | where method is not null and method!='N/A'; |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| ... | @@ -11,6 +11,11 @@ status string, | ... | @@ -11,6 +11,11 @@ status string, |
| 11 | method string, | 11 | method string, |
| 12 | uid string, | 12 | uid string, |
| 13 | biz_data string, | 13 | biz_data string, |
| 14 | platform string, | ||
| 15 | deviceInfo string, | ||
| 16 | version string, | ||
| 17 | imei string, | ||
| 18 | app_id string, | ||
| 14 | code string, | 19 | code string, |
| 15 | trace string, | 20 | trace string, |
| 16 | timestamp string | 21 | timestamp string |
| ... | @@ -33,6 +38,11 @@ CREATE TABLE biz_data_response( | ... | @@ -33,6 +38,11 @@ CREATE TABLE biz_data_response( |
| 33 | method string, | 38 | method string, |
| 34 | biz_data string, | 39 | biz_data string, |
| 35 | uid string, | 40 | uid string, |
| 41 | platform string, | ||
| 42 | deviceInfo string, | ||
| 43 | version string, | ||
| 44 | imei string, | ||
| 45 | app_id string, | ||
| 36 | timestamp string, | 46 | timestamp string, |
| 37 | response string | 47 | response string |
| 38 | ) ROW FORMAT DELIMITED FIELDS TERMINATED BY '\t'; | 48 | ) ROW FORMAT DELIMITED FIELDS TERMINATED BY '\t'; |
| ... | @@ -41,6 +51,11 @@ CREATE TABLE tc_response( | ... | @@ -41,6 +51,11 @@ CREATE TABLE tc_response( |
| 41 | method string, | 51 | method string, |
| 42 | biz_data string, | 52 | biz_data string, |
| 43 | uid string, | 53 | uid string, |
| 54 | platform string, | ||
| 55 | deviceInfo string, | ||
| 56 | version string, | ||
| 57 | imei string, | ||
| 58 | app_id string, | ||
| 44 | timestamp string, | 59 | timestamp string, |
| 45 | response string | 60 | response string |
| 46 | ) ROW FORMAT DELIMITED FIELDS TERMINATED BY '\t'; | 61 | ) ROW FORMAT DELIMITED FIELDS TERMINATED BY '\t'; |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| 1 | use testdb; | 1 | use testdb; |
| 2 | 2 | ||
| 3 | INSERT OVERWRITE TABLE tc_response | 3 | INSERT OVERWRITE TABLE tc_response |
| 4 | select method,biz_data,uid,timestamp,response | 4 | select method,biz_data,uid,platform,deviceInfo,version,imei,app_id,timestamp,response |
| 5 | from qa_log | 5 | from qa_log |
| 6 | where method is not null and method!='N/A' | 6 | where method is not null and method!='N/A' |
| 7 | and (method='com.lejane.handler.common.sidebar.operate.query.new.v3' | 7 | and (method='com.lejane.handler.common.sidebar.operate.query.new.v3' | ... | ... |
| ... | @@ -59,6 +59,11 @@ public class ETLApp { | ... | @@ -59,6 +59,11 @@ public class ETLApp { |
| 59 | String method = StringUtil.isNull; | 59 | String method = StringUtil.isNull; |
| 60 | String uid = StringUtil.isNull; | 60 | String uid = StringUtil.isNull; |
| 61 | String biz_data = StringUtil.isNull; | 61 | String biz_data = StringUtil.isNull; |
| 62 | String platform = StringUtil.isNull; | ||
| 63 | String deviceInfo = StringUtil.isNull; | ||
| 64 | String version = StringUtil.isNull; | ||
| 65 | String imei = StringUtil.isNull; | ||
| 66 | String app_id = StringUtil.isNull; | ||
| 62 | String code = StringUtil.isNull; | 67 | String code = StringUtil.isNull; |
| 63 | 68 | ||
| 64 | String log = value.toString(); | 69 | String log = value.toString(); |
| ... | @@ -130,11 +135,46 @@ public class ETLApp { | ... | @@ -130,11 +135,46 @@ public class ETLApp { |
| 130 | if(StringUtil.isMessyCode(biz_data)) { | 135 | if(StringUtil.isMessyCode(biz_data)) { |
| 131 | biz_data = ""; | 136 | biz_data = ""; |
| 132 | } | 137 | } |
| 138 | }else if(requests[i].contains("platform=")) { | ||
| 139 | platform = requests[i].replace("platform=",""); | ||
| 140 | platform = StringUtil.format(platform); | ||
| 141 | if(StringUtil.isMessyCode(platform)) { | ||
| 142 | platform = ""; | ||
| 143 | } | ||
| 144 | }else if(requests[i].contains("deviceInfo=")) { | ||
| 145 | deviceInfo = requests[i].replace("deviceInfo=",""); | ||
| 146 | deviceInfo = StringUtil.format(deviceInfo); | ||
| 147 | if(StringUtil.isMessyCode(deviceInfo)) { | ||
| 148 | deviceInfo = ""; | ||
| 149 | } | ||
| 150 | }else if(requests[i].contains("version=")) { | ||
| 151 | version = requests[i].replace("version=",""); | ||
| 152 | version = StringUtil.format(version); | ||
| 153 | if(StringUtil.isMessyCode(version)) { | ||
| 154 | version = ""; | ||
| 155 | } | ||
| 156 | }else if(requests[i].contains("imei=")) { | ||
| 157 | imei = requests[i].replace("imei=",""); | ||
| 158 | imei = StringUtil.format(imei); | ||
| 159 | if(StringUtil.isMessyCode(imei)) { | ||
| 160 | imei = ""; | ||
| 161 | } | ||
| 162 | }else if(requests[i].contains("app_id=")) { | ||
| 163 | app_id = requests[i].replace("app_id=",""); | ||
| 164 | app_id = StringUtil.format(app_id); | ||
| 165 | if(StringUtil.isMessyCode(app_id)) { | ||
| 166 | app_id = ""; | ||
| 167 | } | ||
| 133 | } | 168 | } |
| 134 | } else { | 169 | } else { |
| 135 | uid = StringUtil.isNull; | 170 | uid = StringUtil.isNull; |
| 136 | method = StringUtil.isNull; | 171 | method = StringUtil.isNull; |
| 137 | biz_data = StringUtil.isNull; | 172 | biz_data = StringUtil.isNull; |
| 173 | platform = StringUtil.isNull; | ||
| 174 | deviceInfo = StringUtil.isNull; | ||
| 175 | version = StringUtil.isNull; | ||
| 176 | imei = StringUtil.isNull; | ||
| 177 | app_id = StringUtil.isNull; | ||
| 138 | } | 178 | } |
| 139 | } | 179 | } |
| 140 | } | 180 | } |
| ... | @@ -157,6 +197,11 @@ public class ETLApp { | ... | @@ -157,6 +197,11 @@ public class ETLApp { |
| 157 | builder.append(method).append("\t"); | 197 | builder.append(method).append("\t"); |
| 158 | builder.append(uid).append("\t"); | 198 | builder.append(uid).append("\t"); |
| 159 | builder.append(biz_data).append("\t"); | 199 | builder.append(biz_data).append("\t"); |
| 200 | builder.append(platform).append("\t"); | ||
| 201 | builder.append(deviceInfo).append("\t"); | ||
| 202 | builder.append(version).append("\t"); | ||
| 203 | builder.append(imei).append("\t"); | ||
| 204 | builder.append(app_id).append("\t"); | ||
| 160 | builder.append(code).append("\t"); | 205 | builder.append(code).append("\t"); |
| 161 | builder.append(trace).append("\t"); | 206 | builder.append(trace).append("\t"); |
| 162 | builder.append(timestamp); | 207 | builder.append(timestamp); | ... | ... |
-
Please register or sign in to post a comment