Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Perl csv insert with special character

by graff (Chancellor)
on Dec 31, 2014 at 10:08 UTC ( [id://1111816]=note: print w/replies, xml ) Need Help??


in reply to Perl csv insert with special character

Step 1: Whatever computer you are using to post questions here, have Perl and Text::CSV (and Text::CSV_XS) installed there, and either copy or create a suitable quantity of relevant CSV data on that computer.

Step 2: Write a Perl script (on that computer) to read all the csv data, using the same approach you intend to use on your "work laptop"; this script should print out a simple summary report: how many files were opened for reading, and how many rows of data were read (in total, and/or per csv file).

Step 3: If this test script (written and run on the computer that you use to post questions on PM) does not report the expected quantities, or doesn't run at all, and you can't figure out why, copy/paste that script, along with its output, including error messages/warnings, all within code tags when you post your next question here.

Step 4: Once you confirm that your test code reads all your test csv data correctly, run that exact same code on your "work laptop", and see whether it reports correct numbers for the actual (production) csv data that you need to load into your database. If it doesn't, you need to figure out how your test data differs from the production data, and adjust your code accordingly. If necessary, add to the test data on your testing/posting machine to replicate the problem, so you can copy/paste the records that cause the trouble.

Step 5: Once you confirm that your test code reads all your production data correctly, make a copy of it and use the copy to add the Oracle DB stuff. I would recommend using DBI if possible (this will automatically invoke DBD::Oracle for the connection); that way, you would be able to put some other database handler on your testing/posting machine - e.g. SQLite or MySQL - in order to perform the same DB operations without having to run your own separate Oracle server. (There could be differences between Oracle and other DBs that might cause problems for you, but at least you'd be able to isolate problems of this sort with some confidence.)

Maybe that sounds like a lot of work, but from what I can see, if you don't do that, you'll never finish the job.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1111816]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (5)
As of 2024-03-28 13:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found