ocn04023test 500 | 20180402173007 | | 4013 | Start | 10.10.26.115 | 00:24: e8:9 b: fb: 81 | 10.10.100.88 |
Ocnqp00021177 500 | 20180402173143 | | 4013 | Start | 10.10.26.115 | 00:24: e8:9 b: fb: 81 | 10.10.100.88 |
Ocnqp00003513 | | 4013 Interim - Update | 500 | 20180402173300 | 10.10.26.115 | 00:24: e8:9 b: fb: 81 | 10.10.100.88 |
Ocnqp00032065 500 | 20180402173303 | | 4013 | Stop | 10.10.26.115 | 00:24: e8:9 b: fb: 81 | 10.10.100.88 |
Import mysql table, because the data format in mysql LOAD command rules, and then I use the LOAD command to import data from the file to mysql table, and I also import succeeded, but now there is another demand, can be seen from the above data, each line of data has a Start, Stop and Interim - Update the three types, in the actual project Interim - Update type is a large amount of user data, just don't want that user data is written to mysql table, I want to ask how to set up the LOAD command to according to certain rules to filter out particular line (that is, based on what filtering rules to filter out Interim - Update line)?
CodePudding user response:
First remove the contained in a text editor tool Interim - UpdateCodePudding user response:
Before processing, such as Linux can use grep filters, Windows can use findstr searches, put the filtered data in a file to import