XML file processing but with warning message.

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
synsog
Premium Member
Premium Member
Posts: 232
Joined: Sun Aug 01, 2010 11:01 pm
Location: Pune

XML file processing but with warning message.

Post by synsog »

How to get rid of the warning message. ?
"XML input document value is empty or NULL" This is not causing job failure, just a warning message. but we need to maintain 0 errors in any job in our environment.

Code: Select all

most of the xmls coming from source are files, matching to 1 of the below struture.

-------------------------------------------------------------------------------------------
<SampleXML_1> 
   <Level1> 
    <elementattributes name="level1" col1="a" col2="b" col3="c" > 
     <subelements> 
        <col4="d" col5="e" col6="f"> 
        <col4="g" col5="h" col6="i"> 
     </subelements> 
    </elementattributes> 
    <elementattributes name="level2" col1="j" col3="l" > 
     <subelements> 
        <col4="mlk" col5="nop" col6="qrs"> 
        <col4="KLM" col5="NOP" col6="QRS"> 
     </subelements> 
    </elementattributes> 
   </Level1> 
 </SampleXML_1> 

-------------------------------------------------------------------------------------------

<SampleXML_2> 
   <Level1> 
    <elementattributes name="level1" col1="a" col2="b" col3="c" > 
   </Level1> 
 </SampleXML> 

-------------------------------------------------------------------------------------------
<SampleXML_3> 
    <elementattributes name="level1" col1="a" col2="b" col3="c" > 

-------------------------------------------------------------------------------------------
In first XML input stage, i am reading the elementattributes in columns, and passing on the <sublelements> chunk in seperate column called "Subelements_chunk".
In second XML input stage, I am processing the chunk <subelements>

All files were processing, in above example file structures 1,2 job is running without any warning message as it matches the meta-data structure. But the 3rd type of xmls are processing with waring message as below

xmlSrc,0: Warning: djpXMLTransform.xmlSrc: XML input document value is empty or NULL. Column Name = "subelements_Chunk"


Here are settings in XML - input stages under "Transformation Settings"
Checked - Repition elements ( as subelemetns have repetition elements)
- Replace empty values with Nulls ( as some xml's dont have elements under <subelements> and xmls like 3rd type.

Defined all columns as Nullable.

Any suggestion , how to eliminate warning message.
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

Are you passing an entirely blank column to this second instance of the Stage?

I don't have any idea if there is a way to supress the error.....perhaps you can put a Transformer in front of the Stage and if the column with xml is blank, then put in a dummy xml string (with something recognizable)....and then deal with removing its parsed row in a stage afterwards.

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
Post Reply