on 06-28-2016 5:08 PM
Dear All,
I have this scenario: There are 10 fields/columns in the mapping spec out of which we have to send only 3 fields values and rest of the fields we have to send the value as delimiter "|". For eg:
We have the mapping defined for 3,5 and 7th fields (in my message mapping I only have the mapping for these 3 fields, here the field name does not matter as we need to pass the value only). So, now my requirement is to send the output like (in file content conversion we have field separator as ')
|,|,3rdfieldvalue,|,5thfieldvalue,|,7thfieldvalue,|,|,|
So you can see that at 1,2,4,6,8,9 and 10th positions I will need to send |
Can anyone tell me how can I achieve this using File content conversion in FTP receiver channel? As in my mapping, I only have mapping for 3 fields and I need to pass | in rest of the fields, can it be done in communication channel?
Thanks,
Amita
Any pointers please...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Amita,
Map all other fields with constant | in the message mapping then you will got the required output in the file.
Regards,
Praveen.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Bhavesh for the response.
Whe you say: You can use Parametrized Mapping if you need to avoid any mapping hard codings where you can pass the "|" as a parameter but is that what you need?
Do you mean that I will have to create the field names (all 10 fields names) in the structure. Currently, I have only 3 field names in my mapping (3,5 and 7th field) In rest of the fields, I want to pass |
How can this be achieved that I want to know. Can't we do something in communication channel (we are using FTP receiver channel with content conversion)
Thanks Evgeniy for the response.
The thing is there are around 100 fields (and I need to pass field values only for some of them and for the remaning ones I need to pass |). Do I need to put all the field names in the structure or I can achieve the purpose by only having the field names which have the values?
If you see my scenario just to simply it with 10 fields... in my current mapping, i only have 3 field names. But the target output should be like
|,|,3rdfieldvalue,|,5thfieldvalue,|,7thfieldvalue,|,|,|
How I can achieve the above output?
There is no out of the box solution from the File Adapters content conversion for this.
You will either need to define these fields in the DataType/MessageType or use a Custom Mapping technique ( Java / XSLT ) or call a Mapping program from the channel as pointed out by Evgeniy.
Regards,
Bhavesh
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.