Wednesday 4 May 2016

Best practice for uploading delimitated files and insert ing into DB?

I'm having trouble putting this one together. Its easy to get the file upload working however I'm a little uncertain on the parse to DB. These files are going to be relatively small so memory should not be a concern. There are also tons of csv-parser type packages out there. I'd like one where you can choose which columns and it converts to JSON. Any suggestions or examples?Thanks!!The files will be in the following format:Monitoring Data ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | Time |Server Name |Act. WPs|Dia.WPs|RFC WPs|CPU Usr|CPU Sys|CPU Idle| Ava.|Paging in|Paging out| Free Mem.|EM alloc.|EM attach.|Em global|Heap Memor|Pri.|Paging Mem|Roll Mem|Dia.|Upd.|Enq.|Logins|Sessions| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | 00:00:08|sappcp0_CP0_00 | 2 | 1 | 32 | 2 | 3 | 95 |5.00 | 0 | 0 | 2,827,708 | 1,892 | 1,784 | 375,052 | 0 | 0 | 54 | 1,127 | 0 | 0 | 0 | 8 | 8 | | 00:00:08|sapvcr01_CP0_00| 1 | 1 | 32 | 0 | 0 | 100 |4.00 | 0 | 0 |11,213,884 | 2,792 | 2,360 | 378,760 | 0 | 0 | 734 | 3,579 | 0 | 0 | 0 | 32 | 32 | | 00:00:08|sapvcr02_CP0_00| 2 | 1 | 32 | 0 | 0 | 100 |4.00 | 0 | 0 |47,230,256 | 2,648 | 2,364 | 378,300 | 0 | 0 | 696 | 3,981 | 0 | 0 | 0 | 36 | 36 |

Submitted May 04, 2016 at 03:57PM by dangerzone2

No comments:

Post a Comment