on 11-06-2013 12:49 PM
Hi gurus,
I'm configure FTP FILE ADAPTER with content conversion, and need aplicate condition for processing the files.
Example:
FILE1.TXT
ABC,PRODUCT,PRICE,DESC
ABC,PRODUCT,PRICE,DESC
FILE2.TXT
DEF,OTHER,OTHER,OTHER
DEF,OTHER,OTHER,OTHER
well, I need get the FILE1.TXT because this one have the key ABC first and archive, but musn´t move the FILE2.TXT because dont have the key ABC.
can aplicate this condition on FTP/FILE ADAPTER?
Help.
Regards Friends
Hi Brian
Maybe you could create a generic content conversion, and depending on data, apply different mappings/conditions
Content conv like
COL1, COL2, COL3 COL3
ABC,PRODUCT,PRICE,DESC
ABC,PRODUCT,PRICE,DESC
DEF,OTHER,OTHER,OTHER
DEF,OTHER,OTHER,OTHER
In the receiver det if COL1#ABC then redirect to another File Receiver
Regards
Javi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you do not want to process those files -instead of processing the files directly, you will have to use the OS commands/script scheduled on your FTP server.
The script should have the logic to filter the files based on it's content.
Ideally it's the sender system responsibility to stop sending such invalid files.
However as Inaki mentioned, you can pick those invalid files and drop at the same location with a different file name/extension to aovid recursive processing
In receiver determination add a condition that if the key is equal to ABC.
Is there any problem doing this.
Thanks
Anand
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
Which version of PI u r using?
In case u r using PI7.31 (single stack) then u can think of using XML validation (apparently, u have to assign "ABC" default value to ur Key field while creating Data type) so in case file doesn't have ABC as its key value then that file will be transferred to some error folder.
The only downside is ur second file will be moved from main folder...
Note - i haven't tried this kind of solution but may be u can give a shot.
Thanks
Amit Srivastava
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
Hmm...in that case personally i would have opted java mapping
1) Using java mapping read the file content and if key "ABC" is not present then move the file to error folder otherwise transfer it to some temp processing folder.
2) Pick files from processing folder and continue with normal scenario.
Thanks
Amit Srivastava
Brian,
I'd suggest to create an OS script that renames files containing ABC to a different extension and have PI poll those files.
Regards,
Koen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Brian,
try to negociate with your source application to have different filename !
regards
Mickael
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Brian,
As far as i know you can't process the data inside the files at standard adapter level but you can do a workaround. In the integration directory under condition option you can access to this value (if you have ESR development), if the condition result is true you can drop the file in the source path.
Regards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.