on 05-23-2011 4:59 AM
Hi All,
I am trying to send a csv file ti DB where i have set a primary key for one field in my JDBC table which has to be unique.
I handled ID generation sequence in mapping using global variables to get a unique number into DB table....If there are multiple files in the sender location, sender adapter is picking all the files at a time and processing the files at a time....and getting error in reciever communication channel as all the files are generating the same value while inserting into the DB table.
Could you please let me know how i can pick each file from the sender location instead of multiple files processing at a time...
Thanks in advance,
Naveen.
Hi,
You can use the parameter connect mode as per file transfer instead of permanent. By using this Per File Transfer mode the adapter will make the connection establish for every file transfer. In this case your issue will be resolved. So let me know your update after implementing this,
Regards,
Raju
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
U can go with stored procedure option in this case.
U can request stored procedure from DB people and give them ur requirement. They can write set of code which can generate unique ID. And u can call that stored procedure from Reciever JDBC channel.
Regrads,
Bhuvan.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Instead of generating the unique id ...get the message id generated by the PI system and use the same while inserting into the database...
PI message id will be unique even if multiple files are picked..
if that is not unique..then another possibility is use of timestamp which will be unique...
HTH
Rajesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI Rajesh,
Thanks for quick reply...
My requirement was to idetify the order number in table which i have generated a sequence to be unique in DB.
Do we have any option to process a single file at a time from the sender location instead of multiple files...i can see processing sequence <bydate> option in nfs but not in FTP.
Please suggest....
Thanks in advance,
naveen
User | Count |
---|---|
98 | |
11 | |
11 | |
10 | |
10 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.