Page 1 of 1

XML generation Issue

Posted: Wed Sep 27, 2017 9:30 am
by nibumathewbabu
For generation of new XML I had created an XSD first then created the job like below
Oracle connector>XML>XML_Output
In the edit assembly of XML stage>XML composer step I choose the option as

"Write to File " and provided output file directory and Filename prefix
the issue I am facing is for each input row DS is generating seperate XML output files.(eg:10 XML files for 10 input rows)
My requirement is to generate a single output XML file with all the input values.

Kindly guide me

Posted: Wed Sep 27, 2017 11:51 am
by chulett
Make sure you did not select 'use trigger column' from the Transformation Settings tab as that will cause the behavior you are seeing. And you don't specify an XML "prefix" but rather the full output path / filename. See if this helps, specifically Step 5.

Posted: Wed Sep 27, 2017 2:10 pm
by eostic
Craig is correct, regarding xmlOutput.......but there is a different problem.....

You might choose Oracle Connector...to xml (hoerarchical if in a newer release)...

OR.....

Oracle to xmlOutput. There are few if any reasons for both xml stage types.
...

Ernie

Posted: Wed Sep 27, 2017 2:22 pm
by chulett
Didn't notice that, good point.

Posted: Wed Sep 27, 2017 2:53 pm
by nibumathewbabu
I changed the XSD and added
minoccurs="0" maxoccurs="unbounded
also
Output -> Mappinng of the XML stage and assigned "top" to the name of the output link

Now only one file is generating but it is only having a single record all other records are missing!! Please help again! :(

Posted: Wed Sep 27, 2017 6:57 pm
by chulett
Are you sure everything isn't there? It could be all there as "one long record".

Posted: Thu Sep 28, 2017 9:24 am
by nibumathewbabu
No I Shall explain further

Job1Oracle-4 rows-->XML_Stage-4 rows-->XMl Ouput Stage

Job2 Oracle-4 rows-->XML_Stage-1 row-->Sequential Stage


In job 1 in the edit assembly of XML stage>XML composer step I choose the option as "Write to File " and provided output file directory and Filename prefix
If you see, 4 rows are reaching till xml output file stage but only one row is getting written in target!Not sure what at all happening!


In Job 2 in the edit assembly of XML stage>XML composer step I choose the option as pass as string and provided target sequential file with one column and the first row only getting passed from XML stage!I had followed the similar pattern from IBM sample composing job kit no idea what at all happening!!

I need to get an output for either of above jobs.Please suggest! :(

Posted: Thu Sep 28, 2017 9:45 am
by nibumathewbabu
I had created another job design as below

Oracle Connector -->Transformer-->XML output

I had followed exactly which is been said here: http://datawarehouse.ittoolbox.com/grou ... 80-3612038

Job is success with no warnings.But target file is not getting created.Could you suggest some possiliblies? I am looking in the correct target path given in the option stage of XML output
File path:/fl***/FCA***/f***/tmp/test/n**/XML/N**_XML_OP.xml

Posted: Thu Sep 28, 2017 10:22 am
by PaulVL
replace xml stage with a peek to see if you are getting data.

Look to see if you have write permissions to that path with the user id that is running the job (in case credential mapping is being used).

Posted: Thu Sep 28, 2017 11:36 am
by nibumathewbabu
Thank you!
With Peek am getting data.
But XML its not.But in the same folder I am able to create new files using sequential stage.What may be the reasons then

Posted: Thu Sep 28, 2017 10:05 pm
by eostic
Build it like this:

Oracle.....Transformer (if needed for any kind of tranform).....xmlOutput......Sequential

On the input link of xmlOutout, out your xml specificatuons in the description property of each column. Like: /mainElement/nextNode/etc/text() .....or similar.... chances are, you have done this part already......

At the output link, have just one single longvarchar column. Call it something like xmlContent. Give it a length such as 99999. Put only a single slash in its description.....and in the transformation settings, use Aggregate. That will force it to collapse all incoming rows into one structure.

In the sequential stage, name your target and use None and None for delimiter and quote character.

Ernie

Posted: Wed Oct 04, 2017 12:22 pm
by nibumathewbabu
Oops since Its being premium content I cant read it in complete :(

Posted: Thu Oct 05, 2017 6:15 am
by ray.wurlod
nibumathewbabu wrote:Oops since Its being premium content I cant read it in complete :(
That's simply solved. Get yourself a premium membership (from the Home page). It IS worth it.