Author |
Message
|
wmc27 |
Posted: Thu Oct 29, 2015 3:06 pm Post subject: Multipe DFDL for File Input Node |
|
|
 Apprentice
Joined: 18 Dec 2008 Posts: 31
|
I've a requirement to create 4 different Interface which are driven by the file name of different format/layout.
i WANT TO create 4 different DFDLs for each file format..Can I have only one FileInput Node and have 4 DFDLs as reference ..so that I don't need to create 4 different Interfaces. |
|
Back to top |
|
 |
timber |
Posted: Fri Oct 30, 2015 1:54 am Post subject: |
|
|
 Grand Master
Joined: 25 Aug 2015 Posts: 1292
|
No - if you had 4 DFDLs for one input node then you would need to have some way to tell IIB which DFDL to use.
It's hard to advise without knowing about your input data formats, but I think you probably want either
a) 4 DFDL xsds ( 1 per input format ) plus 1 DFDL xsd containing a choice of the other 4 ( with discriminators if necessary to help the DFDL parser with the task of resolving the choice )
b) Same solution, but all in a single DFDL xsd.
Which one is best depends on how similar the 4 formats are, and how complex they are. |
|
Back to top |
|
 |
wmc27 |
Posted: Fri Oct 30, 2015 6:36 am Post subject: Multipe DFDL for File Input Node |
|
|
 Apprentice
Joined: 18 Dec 2008 Posts: 31
|
all 4 DFDL are not that complex..That is the reason i wanted to have them in one single Interface.
1) Create one message flow..In the first compute node route the messages to sub flow and perform below steps in each sub flow.
SubFlow 1 -->DFDL 1 as reference
SubFlow 2 --> DFDL 2 as reference
SubFlow 3 --> DFDL 3 as reference
SubFlow 4 --> DFDL 4 as reference
or
2) Create one message flow and have four File Input Node and provide the reference e in each file Input node. |
|
Back to top |
|
 |
smdavies99 |
Posted: Fri Oct 30, 2015 6:43 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
Are all these 'files' going to be written to the same directory?
If so, are they uniquely identifiable as to which one of the four types they belong?
If NO then you are going to have to identify what type they are from a pattern in the data once the File Input node has read them.
Then you can PArse the input tree with the correct DFDL model. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
timber |
Posted: Fri Oct 30, 2015 7:05 am Post subject: |
|
|
 Grand Master
Joined: 25 Aug 2015 Posts: 1292
|
Your option 1) is similar to my a). You would need to
- parses as BLOB in the single FileInput node
- CAST from BLOB to CHARACTER
- Inspect the message to decide which of the 4 DFDL models to use
- Propagate to one of 4 subflows
Creating a single DFDL model for all 4 formats would
+ require less code
+ would look more elegant but
- it might require more thought.
Your choice. |
|
Back to top |
|
 |
wmc27 |
Posted: Fri Oct 30, 2015 10:26 am Post subject: Multipe DFDL for File Input Node |
|
|
 Apprentice
Joined: 18 Dec 2008 Posts: 31
|
smdavies99,timber...Thanks for your inputs.
I have the flexibility to ask the sender to write to same folder or different folder,Yes the file names are going to be different/unique.
I guess,I will give this a try
1) parses as BLOB in the single File Input node
2) CAST from BLOB to CHARACTER
3) Since the file name is unique.Route the file to Subflow1 /2/3/4...
4) Questions
In the sub flow..How do I inspect the DFDL..Will that be in ESQL or at node level... |
|
Back to top |
|
 |
timber |
Posted: Fri Oct 30, 2015 11:34 am Post subject: |
|
|
 Grand Master
Joined: 25 Aug 2015 Posts: 1292
|
I forgot that the filename is unique. I would advise you to forget about using a single FileInput node.
Use 4 different FileInput nodes. Assign one DFDL model to each. If you want, you can use XML Schema and DFDL techniques to avoid duplication in the 4 DFDL models.
Post again if you did not understand that last point. |
|
Back to top |
|
 |
|