Page 1 of 1

REJECT LINK IN XML INPUT STAGE

Posted: Tue May 27, 2008 2:04 am
by sanjumsm
I am using XML input stage, not checking XML against XSD,
If XML file is not in proper tag, then it should abort the job and reject message send to reject link.
for that i m checked reject link option.
using following properties
CASE1:
FATAL- warning/info
ERROR-warning/info
WARNING-warning/info


CASE2:
FATAL- reject
ERROR-reject
WARNING-reject

Above both case job is only aborted and not written any thing in reject link(Reject dataset).

Could you please tell me how do i get reject messages from xml input stage in reject dataset?

Posted: Tue May 27, 2008 5:16 am
by VCInDSX
Did you try enabling the "Log reject error" checkbox?

Posted: Tue May 27, 2008 5:20 am
by sanjumsm
VCInDSX wrote:Did you try enabling the "Log reject error" checkbox?
Yes I tried this option too... But without success.

Following is the warning message...
XML_Output_78,0: Warning: Validate_XML_FileTestSanInvalid2705.xmlSupplierExtract: Xalan fatal error (publicId: , systemId: /isdata/etl/source/reference/frd/xml_FRD_SuppExt.xml, line: 3, column: 1): Unterminated start tag, 'FrdSupplierData'


And the Fatal follows the above warning

APT_CombinedOperatorController,0: Operator terminated abnormally: received signal SIGILL

main_program: APT_PMsectionLeader(2, node2), player 3 - Unexpected exit status 1.
APT_PMsectionLeader(4, node4), player 3 - Unexpected exit status 1.
APT_PMsectionLeader(1, node1), player 4 - Unexpected exit status 1.
APT_PMsectionLeader(3, node3), player 3 - Unexpected exit status 1.


And hence Job is getting aborted and no record is going to the output link.

Posted: Tue May 27, 2008 6:01 am
by VCInDSX
Could you provide a simple representation of your job design please?

E.g....
External Source ==> XMLInput ==> Transformer ...

Your original post says XML Input, but your message log has the stage name as XML_Output_78,0. Is it just a naming convention error or are you working with XML output stage itself?

The "XML Pack Guide" PDF document has some tips on reject links and logging in Chapter-3. That might help you as well.

For splitting the operator level messages into their constituent operator-level messages, set 'APT_DISABLED_COMBINATION' to true

Posted: Tue May 27, 2008 6:10 am
by throbinson
Well, the first thing you should do is get well formed XML. Can the XML above be parsed by, say IE? I think not. At the very least the start tag

<FrdSupplierData>

has got to have one of these End tag thingys;

</FrdSupplierData>

I don't think Xalan can do anything with input that is not well-formed except fail.

Posted: Tue May 27, 2008 6:58 am
by sanjumsm
Hi

For valid XML file the job is working perfect. I have requirement as following.

For invalid XML file (Say header is missing or any tag is missing) I have to store the reason why that file has failed. Or its status say "Invalid" in Dataset. For testing purpose I put XML output stage and give the file name in that stage. But the thing is when job is getting aborted there will not be any record passing through the reject link or output link as shown below. Job design is...

rowGenrator-> transformer---> Xml(Input Stage)-->Transformer->datset
|
Dataset(XML output stage as reject link)

Posted: Tue May 27, 2008 8:00 am
by throbinson
Gotcha. I went to the documentation; page 33 of xmLPACK_20_Designer.pdf
Mapping Transformation Errors to DataStage Errors
The XML parser reports three types of conditions: fatal, error, and
warning.
&#56256;&#56452; Fatal errors are thrown when the XML is not well-formed.
FATAL means stop. It doesn't mean write a reject then stop.
The other settings apply when the XML is being validated.

My understanding is that XML can't be validated without it being well-formed.

Posted: Tue May 27, 2008 9:19 am
by sanjumsm
&#56256;&#56452; Fatal errors are thrown when the XML is not well-formed.[/quote]
FATAL means stop. It doesn't mean write a reject then stop.
The other settings apply when the XML is being validated.

My understanding is that XML can't be validated without it being well-formed.[/quote]


So if a xml file doesnt match with its given xsd then we can not capture the error message as Fatal will stop the job and hence nothing will be written to reject link(dataset in this case)? So, how to catch the message and put it i in say a dataset?

Posted: Tue May 27, 2008 7:10 pm
by eostic
It's "possible" that you are being impacted by an 8.0 issue with validation. Can't say for sure, but it's worth checking....this is certainly a more interesting one, but by chance do you have an xsd where you can formally check type or length or attribute value validation (for example)? Either way, it's probably worth a support call to your provider. The condition may be more specific and not exactly what you are seeing, but there has been a reported issue with this capability in v8.

Ernie

Posted: Thu Jun 25, 2009 9:50 am
by sjfearnside
Was there a solution to this issue from the support provider?

Did u Get any solution for this

Posted: Tue Jan 19, 2010 6:11 pm
by shukla_krishna
sjfearnside wrote:Was there a solution to this issue from the support provider?

Posted: Tue Jan 19, 2010 11:04 pm
by kejuste
I Agree with author eostic,

This is my tip for the problem.

please recheck the extract xsd or xml file format.

if you are etl process is same as mine. see below.

folder--->transformer---->XML--->transformer--->any stage.

make sure the Preserve CRLF is marked as "Yes".

Hope this tip help.

cheers,

Posted: Tue Jan 19, 2010 11:05 pm
by kejuste
I Agree with author eostic,

This is my tip for the problem.

please recheck the extract xsd or xml file format.

if you are etl process is same as mine. see below.

folder--->transformer---->XML--->transformer--->any stage.

make sure the Preserve CRLF is marked as "Yes".

Hope this tip help.

cheers,