Re: Database table load utility

2010-11-09 Thread Chandrashekar Bhat
How about DBI ? I am not sure of ORACLE, but i have used DBIfor mysql (similar kind of project), only connector will be different i believe. Thanks, Chandrashekar On Tue, Nov 9, 2010 at 1:09 AM, Parag Kalra wrote: > >>I'm in the thinking stage

Re: Database table load utility

2010-11-08 Thread Parag Kalra
>>I'm in the thinking stages of creating a table-load utility, which reads a tab-separated CSV file and inserts or updates rows in a >>relational table (probably Oracle). I don't think that will be too hard, having used Perl DBI/DBD modules in the past. Since you are planning to design your own t

Re: Database table load utility

2010-11-07 Thread Chap Harrison
On Nov 7, 2010, at 11:15 PM, shawn wilson wrote: > Ooh, I didn't know about inotify. Yeah, this is much more appealing. Looks like Linux::Inotify2 is better-supported than Linux::Inotify. > It would seem that you can either use it > within perl (just keep the script running like a service) or

Re: Database table load utility

2010-11-07 Thread shawn wilson
Ooh, I didn't know about inotify. It would seem that you can either use it within perl (just keep the script running like a service) or from a command line. I think it really comes down to how often you're expecting new files. And I don't know how the perl module works - its possible you might have

Re: Database table load utility

2010-11-07 Thread shawn wilson
Perl's flock and then unlink (IIRC, in perl to delete it) and move to the next one. That, or if you think you'll get too busy, check for a 'lock' file, if it doesn't exist, create it, run, then delete your lock file. On Nov 7, 2010 11:46 PM, "Chap Harrison" wrote: > > On Nov 7, 2010, at 6:47 PM, s

Re: Database table load utility

2010-11-07 Thread Ishwor Gurung
Hi. On 8 November 2010 15:46, Chap Harrison wrote: > > On Nov 7, 2010, at 6:47 PM, shawn wilson wrote: > >> its Unix, I'd use cron as its probably already running. And do something >> like: script.pl $(find -type f -print0) Every few seconds. > > That looks plenty straightforward enough, except

Re: Database table load utility

2010-11-07 Thread Chap Harrison
On Nov 7, 2010, at 6:47 PM, shawn wilson wrote: > its Unix, I'd use cron as its probably already running. And do something > like: script.pl $(find -type f -print0) Every few seconds. That looks plenty straightforward enough, except how does one prevent a race condition wherein cron launches

Re: Database table load utility

2010-11-07 Thread shawn wilson
its Unix, I'd use cron as its probably already running. And do something like: script.pl $(find -type f -print0) Every few seconds. Have the script die if ARGV[0] is undefined. I don't remember what character '-print0' puts between files -check the man pages and split on that. Loop through the fil

Database table load utility

2010-11-07 Thread Chap Harrison
Hi folks, I'm in the thinking stages of creating a table-load utility, which reads a tab-separated CSV file and inserts or updates rows in a relational table (probably Oracle). I don't think that will be too hard, having used Perl DBI/DBD modules in the past. What's different is that customer