Page 1 of 1

XML to seq (flat file)

Posted: Mon Nov 14, 2005 6:15 pm
by troywinston
Guys doing an xml source file to convert to seq (flat file). This is my design
seq ->xmlinput->transformer->seq.

Validation OK, but I get this message when I run
"Cannot find mandatory property "xml_source_column". "
Any suggestions, I know it is refferin to XMP input stage under input then under XML source column but I have no idea what to put for the XML source column?

Posted: Mon Nov 14, 2005 6:36 pm
by chulett
Umm... what happened to the Folder stage up front? I really don't think you can feed an XML Input stage from a Sequential File stage...

What does your metadata in the Sequential File stage look like? One big column?

Posted: Mon Nov 14, 2005 6:47 pm
by troywinston
I did try the folder stage before. But I was getting other problems such as Unable to open folder containing teh file xx. Also with the foder stage I was unable to even get it validated.
tried the
seq and at minimum I got it validated, just having this final problem about XML source column.

Posted: Mon Nov 14, 2005 7:08 pm
by lstsaur
Hi,
Put your sequential stage's column name in the XML source column of the XML Source tab.

Posted: Mon Nov 14, 2005 8:26 pm
by chulett
chulett wrote:What does your metadata in the Sequential File stage look like? One big column?
Survey says?

Try bringing in the entire XML record in as one field and hooking them together as noted by lstsaur, let us know how that goes.

Posted: Tue Nov 15, 2005 5:26 am
by dprasanth
troywinston wrote:I did try the folder stage before. But I was getting other problems such as Unable to open folder containing teh file xx. Also with the foder stage I was unable to even get it validated.
tried the
seq and at minimum I got it validated, just having this final problem about XML source column.
Even I had the problems like what you mentioned in the folder stage, but got it resolved as follows.The first stage you should have is the folder stage.
In the OUPUT tab of the FOLDER stage, you will have three tabs. The last tab is the columns.
Add these two columns namely
FILENAME (DEFINE it as a key with SQLtype VARCHAR)
RECORD(Define it as SQLtype LONGVARCHAR with length like 99999999)

Now the second stage after the folder stage should be the XML Input stage. In the Input tab, you will have a tab called XML Source.Here define the XML source column as RECORD(which was defined in the FOLDER stage. You will have that as a drop down list).Then in the COLUMNS tab , again define the columns as FILENAME and RECORD

In the output tab you can define the actual XML columns. I did it this way and it worked. Hope it helps u out.

Cheers

Posted: Tue Nov 15, 2005 1:39 pm
by troywinston
Sorry for the hold up guys.
With the Seq file stage it worked but I also had to do put in that "FILENAME" & "RECORD" info. I have not yet re-attempted with the folder stage I will do so and let u guys know teh results.
thanks again.

Posted: Tue Nov 15, 2005 4:54 pm
by troywinston
Yes it also does work from the folder stage!!

Posted: Tue Nov 28, 2006 8:21 am
by msarkar00
troywinston wrote:Sorry for the hold up guys.
With the Seq file stage it worked but I also had to do put in that "FILENAME" & "RECORD" info. I have not yet re-attempted with the folder stage I will do so and let u guys know teh results.
thanks again.
Hi,

We have created a job with an seq file followed by a xml input stage..then a copy stage and finally the data will be written into a seq file...

the xml structure is
<?xml version="1.0" ?>
- <customers>
- <customer id="55000">
<name>Charter Group</name>
- <address>
<street>100 Main</street>
<city>Kolkata</city>
<state>WB</state>
<zip>700091</zip>
</address>
</customer>
- <customer id="66000">
<name>Tata Group</name>
- <address>
<street>Park Street</street>
<city>Kolkata</city>
<state>WB</state>
<zip>700091</zip>
</address>
</customer>
</customers>

We want to convert this into a seq file. We have loaded the metadata using the xml_data_definations into the seq file and selected id as the key field. The key field is id and it is a decimal.

Now when we run the job we get an error saying:

Sequential_File_34: At field "id": When validating import/export function: APT_GFIX_Decimal::validateParameters: Decimal "text" format is variable length and no external length is specified. Possibly you should specify an appropriate "width" property? External format: {text, padchar=32, nofix_zero, precision=10, scale=5, round=trunc_zero, ascii}

Could u Pls help??

Posted: Tue Nov 28, 2006 8:27 am
by chulett
:!: You've not only posted your problem in someone else's thread, but mixed a PX job problem in with a Server one. Best if you repost this in a new thread in the PX forum. That way we also know what your version number and O/S platform is, right now we'd have to guess.

Posted: Tue Nov 28, 2006 8:46 am
by msarkar00
chulett wrote::!: You've not only posted your problem in someone else's thread, but mixed a PX job problem in with a Server one. Best if you repost this in a new thread in the PX forum. That way we also know what your version number and O/S platform is, right now we'd have to guess.
I am really sorry to do so..I was browsing thru and saw a similar thread so posted it here..Thanx for ur advice,