I am using a simple sequential file as a source.
I am not getting any warnings in the log and the job succeeds. I am using the new XML stage as target so it does not give me the XPath anywhere.
I also can't see any option of clicking repeated elements or key column in the new XML stage.
I just map the columns in the assembly editor and that is it. In assemble editor I only have Input step, composer and the output step.
If I pass the header along in the downstream then the XML skips the header and writes the records from the first row.
You say "header"..... but do you really mean "the first row"? Often a header means a row that is in some different type of format.
If we assume that you simply have three TOTAL rows, then perhaps your schema has other validating criteria. Are the datatypes correct? are there any enumerations?
Don't worry about the xpath and the repetition element. You are using a different Stage.
Yes you are correct. The stage always skips the the first row. I have set first row as header in source seq file so the header is not going forward anyways.
I unchecked treat first row as header from the sequential source file. Now in this case the header along with rows goes downstream thru X'fer to the XML stage and now the XML stage skips the header and processes the records from the first row. So the conclusion is:-
XML stage skips the first row irrespective of what it is header or actual rows.. Now if I want that the data should not be skipped, the only workaround I have is to pass the header along.
Please also refer the XSD above in my first post. It has no restrictions I can see and all data types are string.
I am not sure why the XML stage keeps on skipping the first row. I have tried this with different XSD's and the behavious is same for all the XSD's.
Please help.
At the moment, I can't imagine. Never seen it do that. ...unless there is other logic in your Assembly, like a pivot or an aggregator or a switch, etc. that is causing it to drop. Put a transformer in front of the xml and send the rows to another sequential file. Be sure your first row (let's stop calling it a header) is in that file.
I used a transformer and a file as a target along with XML stage. All rows are written to the file target but with XML stage its again the same (total rows -1).So the first row is skipped in all cases with all of my XSD's. The first row passes through the transformer and is not written to the output link from transformer to the XML stage and the same is correctly written to the output link which goes from the transformer to the file target.
Next steps which I will try is :-
1.Use database as source and XML stage as target and then check
2.Try on another server
3.Try with more XSD's
Please let me know if you can think of any other solution.
a) make certain that you do NOT have validation selected in the Composer step
b) do tests with 100% character string data (varchar, char on the links), and find (for testing) an xsd that uses only xs:string elements.
Also...what are the sequence of Steps in your Assembly? Are you using a variety of reGroups to aggregate upper level node information?
Check that first row. Make sure also that there aren't any other reasons that the row might be dropped. Any nulls or anything in that row? And as noted earlier, for now, make sure that all your data is 100% character, and present, and loading only to xs:string type elements.