There are two Modules say A and B...n both have few set of files..we have one script which read these files and load into database(vertica) table..while running script smtimes i encounter an error like one table is getting loaded from A module file also and module B file also..and due to this licking my script fails.
Now A & B run parellely so when A's file getting loaded into table it locks the table and B files fails to load..
so i want to add a piece of code where my script will wait till A file completley load into table and stop the file of B..n once A file loaded it will start loading B file into B..
Overall i need to Develop table update dependency tracking to avoid query failure due to table lock.
I knw its very confusing but if anyone can provide some input , i wud be very grateful..
@jim_mcnamara::--i am using Windows OS but connected to LINUX server to write n execute my shell scripts...so i guess i need a code corresponds to LINUX OS...
---------- Post updated at 07:02 AM ---------- Previous update was at 06:57 AM ----------
@RudiC::
well i am using cron jobs to run my script.. i have one load_cdr script which loads all files in diff modules to table...actually i dont want to put lock on table rather i need something like if A module file and B module File are interdependent then my script should run first A file and wait till it completes and then B file should execute...
So as per my understanding if i put some lock while reading module A file and if B module File comes into the picture my script will go in sleep mode till the lock on Module A file gets remove...smthin like that..but i am not getting how to write this into unix script..
Hi RudiC
there is only one script but we have multiple source feeds..so every feed has 10 set of files..so there is some interdependency on two files and these files exist in diff source feeds..so i run that main script and all feed's files loaded parallely but when ever those two inter dependent files come together it gets lock and i get an error..so i am not getting any problem loading two files together in db rather i am getting prob while reading those files simultaneously from my main script..