Jun 30, 2013, 8:30 AM
Saying you're having "no success" is a very poor problem description and doesn't give us any info on what you're doing or the results you're getting.
Re: [Norwegian_Wood] parse tab delimited file and write to new files
What have you tried? You need to post your code.
What were the results?
How do the results differ from what you expected?
Did you receive any errors/warnings and if so what were they?
When you say you're trying to print to multiple files within the loop, are you saying you're trying to write to 3000 different files on each iteration of the loop?
I need to have the source data normalized before I import it.That does not require creating 3000 separate files which then need to be parsed when inserting the data into the database.
You normalize the database structure/schema before anything else. Then as you parse each line of your source data, you either insert each record as needed, or if the record needs to be built up from multiple lines, you'd store the data in proper data structure, such as a hash, and do the insert(s) when the record has all of its data points.
BTW, creating 3000 tables with the exact same structure is far from being normalized.
(This post was edited by FishMonger on Jun 30, 2013, 8:32 AM)