on 12-30-2008 8:44 AM
hi all,
i looked around quite a bit and didn't found an answer to this very common problem.
i used this blog:
for using a dynamic filename.
the problem i get is the file adapter create a empty line instead of the FILENODE which i need to be suppressed and not written to the file.
is it possible?
regards,
roi grosfeld
hi,
thanks for the fast reply...
this seem really complicated and i don't wanna spend much time on it.
i think the best choice will be to pass the filename in the data type of my data.
it will repeat all over the rows and i will get it from the first row.
kind of ugly solution but this is the fastest one i guess.
regards,
roi grosfeld
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
in the last couple of hours i tryed to do what the thread say and i got the idea..
and a really nice one indeed.
the problem is that my scenario isn't File->XI->File so the sender file adapter can't create the FileName in the message header.
is it possible to only create the parameters in the target for the reciever file adapter?
if so can i test it in the integration builder (can i add the filename to the configuration using the test option in the message mapping?)?
regards,
roi grosfeld
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Well thats good question. you can't test it in test tab of mapping.
It will give you exception like something below
RuntimeException in Message-Mapping transformation: Runtime exception
Here you can create the file name in Mapping either by using various APIs as well as Sender side filed values and can pass to the UDF that you will create for dynamic filename.
File with same name will be created. This is specific to DynamicConfiguration class which deals with the values at runtime.
Thanks
Swarup
hi,
sorry but still didn't work... now i get the empty line if the end of the file instead of in start of the file
FILENODE was first in my message type and the RECORDSET was second.
regards,
roi grosfeld
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I hope you might have used it in below way,
FILENODE.fixedLengthTooShortHandling Cut
FILENODE.fieldFixedLengths 0
Recordset.fieldSeparator '0x0D''0x0A'
and the Message type is as below,
Root---->
-
FILENODE
-
RECORDSET
This scenario have worked successfully in one of my previous project.
Thanks
Swarup
Hi,
Try to change the sequence as FILENODE and RECORDSET structure in receiver Message Type (reverse way).
Thanks
Swarup
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.