XML Stage Convert from Old v6.1 to new V8.1
Moderators: chulett, rschirm, roy
Thanks for your reply.
The main root is <Claims> under claims <claim-audit-information>, <service-order> under
<service-order>
<service-order-data>
<parts>
<job>
</service-order>
but here service-order and service-order-data XML description defined as following way in OLD job.
SERVICEORDER YES char(8) /service-order/-
service-order-data YES char(7) XML service-order/service-order-data/-
I am not sure how i defined in NEW JOB XML Output stage.
//-----------------------------------------------------------------------------
What is meaning of /service_order/- in description?
After I modified my job I am getting following file.
- <claims>
- <tpi-info>
<archive-flag>Yes</archive-flag>
</tpi-info>
- <claim-audit-information>
<TotalNumberOfRecords>1234</TotalNumberOfRecords>
<NumberOfRecordsinFile>123</NumberOfRecordsinFile>
<SliceNumber>1</SliceNumber>
<PackedFlag>YES</PackedFlag>
<GeneratedBy>ETL NPS NPJ DOWNLOAD</GeneratedBy>
</claim-audit-information>
- <service-order>
SO_NOSVC_UN_NO
<service-order-data>SVC_UN_NO</service-order-data>
</service-order>
Here if under <Service-order > I am getting header also. I have made service-order and service-order-data as KEY 'Yes'.
I would like to print following format. The Service-order,service-order-data and parts filed values coming from transformer stage. What is the correct syntax for XML path
- - <service-order>
<service-order-data>12345||201111|test</service-order-data>
<parts>00000|333333</parts>
- - <service-order>
The main root is <Claims> under claims <claim-audit-information>, <service-order> under
<service-order>
<service-order-data>
<parts>
<job>
</service-order>
but here service-order and service-order-data XML description defined as following way in OLD job.
SERVICEORDER YES char(8) /service-order/-
service-order-data YES char(7) XML service-order/service-order-data/-
I am not sure how i defined in NEW JOB XML Output stage.
//-----------------------------------------------------------------------------
What is meaning of /service_order/- in description?
After I modified my job I am getting following file.
- <claims>
- <tpi-info>
<archive-flag>Yes</archive-flag>
</tpi-info>
- <claim-audit-information>
<TotalNumberOfRecords>1234</TotalNumberOfRecords>
<NumberOfRecordsinFile>123</NumberOfRecordsinFile>
<SliceNumber>1</SliceNumber>
<PackedFlag>YES</PackedFlag>
<GeneratedBy>ETL NPS NPJ DOWNLOAD</GeneratedBy>
</claim-audit-information>
- <service-order>
SO_NOSVC_UN_NO
<service-order-data>SVC_UN_NO</service-order-data>
</service-order>
Here if under <Service-order > I am getting header also. I have made service-order and service-order-data as KEY 'Yes'.
I would like to print following format. The Service-order,service-order-data and parts filed values coming from transformer stage. What is the correct syntax for XML path
- - <service-order>
<service-order-data>12345||201111|test</service-order-data>
<parts>00000|333333</parts>
- - <service-order>
I hope you have gone to a whole new tabledef imported as above...you need to have no "xml" data elements...there is too much potential that they will mess things up.
Ernie Ostic
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
Thanks
What is meaning of /service_order/- in description?
After I modified my job I am getting following file.
- <claims>
- <tpi-info>
<archive-flag>Yes</archive-flag>
</tpi-info>
- <claim-audit-information>
<TotalNumberOfRecords>1234</TotalNumberOfRecords>
<NumberOfRecordsinFile>123</NumberOfRecordsinFile>
<SliceNumber>1</SliceNumber>
<PackedFlag>YES</PackedFlag>
<GeneratedBy>ETL NPS NPJ DOWNLOAD</GeneratedBy>
</claim-audit-information>
- <service-order>
SO_NOSVC_UN_NO
<service-order-data>SVC_UN_NO</service-order-data>
</service-order>
Here if under <Service-order > I am getting header also. I have made service-order and service-order-data as KEY 'Yes'.
I would like to print following format. The Service-order,service-order-data and parts filed values coming from transformer stage.
What is correct syntax for XML path
- - <service-order>
<service-order-data>12345||201111|test</service-order-data>
<parts>00000|333333</parts>
- - <service-order>
What is meaning of /service_order/- in description?
After I modified my job I am getting following file.
- <claims>
- <tpi-info>
<archive-flag>Yes</archive-flag>
</tpi-info>
- <claim-audit-information>
<TotalNumberOfRecords>1234</TotalNumberOfRecords>
<NumberOfRecordsinFile>123</NumberOfRecordsinFile>
<SliceNumber>1</SliceNumber>
<PackedFlag>YES</PackedFlag>
<GeneratedBy>ETL NPS NPJ DOWNLOAD</GeneratedBy>
</claim-audit-information>
- <service-order>
SO_NOSVC_UN_NO
<service-order-data>SVC_UN_NO</service-order-data>
</service-order>
Here if under <Service-order > I am getting header also. I have made service-order and service-order-data as KEY 'Yes'.
I would like to print following format. The Service-order,service-order-data and parts filed values coming from transformer stage.
What is correct syntax for XML path
- - <service-order>
<service-order-data>12345||201111|test</service-order-data>
<parts>00000|333333</parts>
- - <service-order>
In V8.1 I have spilt the job1 and Job2
Job1: Witting into Sequential stage and out put looks good
Jobs 2: Read from Sequential stage into XML output stage.
But still I am not getting proper output.
OLD version XML path
---------------------------------
TPIINFO char(5) /tpi-info/archive-flag
SERVICEORDER YES char(8) XML /service-order/-
But New version I have modified
---------------------------------------------------------------------------------
TPIINFO char(5) /claims/tpi-info/archive-flag/text()
SERVICEORDER YES char(8) XML /claims/service-order/text()
when I added SERVICEORDER columne as key I am getting different and also I am getting following error
"Only one top level element is allowed in an XML document. Error processing resource 'file:///C:/Sears_BI_CS/ETL_SUPPORT/ETL...
<claims>
"
Thanks
Man
Job1: Witting into Sequential stage and out put looks good
Jobs 2: Read from Sequential stage into XML output stage.
But still I am not getting proper output.
OLD version XML path
---------------------------------
TPIINFO char(5) /tpi-info/archive-flag
SERVICEORDER YES char(8) XML /service-order/-
But New version I have modified
---------------------------------------------------------------------------------
TPIINFO char(5) /claims/tpi-info/archive-flag/text()
SERVICEORDER YES char(8) XML /claims/service-order/text()
when I added SERVICEORDER columne as key I am getting different and also I am getting following error
"Only one top level element is allowed in an XML document. Error processing resource 'file:///C:/Sears_BI_CS/ETL_SUPPORT/ETL...
<claims>
"
Thanks
Man
Parts repeats "under" service-order, doesn't it? If so, then THAT's the single column that needs to be "key"...(repetition element -- it doesn't mean that it is a key, per se).
Ernie
Ernie
Ernie Ostic
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
sounds to me like you don't want a "value" in the service-order element? If so, just delete the column from the link.
Ernie
Ernie
Ernie Ostic
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
as noted above, the column with "parts" should be your key, if that's the node that repeats underneath service-order.
Your xpath looks syntactically correct, but only you can know your data. It should work, provided that "parts" is the only sub-node that repeats under service-order.
If any of the other nodes repeat under service-order, then this is a vastly more complex problem to solve.
Ernie
Your xpath looks syntactically correct, but only you can know your data. It should work, provided that "parts" is the only sub-node that repeats under service-order.
If any of the other nodes repeat under service-order, then this is a vastly more complex problem to solve.
Ernie
Ernie Ostic
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
For right now, forget the old Job...key is meaningless in the old xmlWriter Stage....it has a far different meaning and impact in the xmlOutput Stage....the functionality and behavior of the two stages, especially for "key" is entirely different......
...as noted in the thread, this exercise will require that you learn how the new one works and build the solution appropriately.
If in fact you have multiple nodes beneath service-order that repeat, then you will need a more complex technique that builds those nodes beforehand.
The Best Practices document for xml will be helpful here. Get a copy of it if you don't have it already...you can find it in various threads in this forum.
It describes how you can build one "chunk" of XML that repeats, put it into a hash table and then do a join to pick it up later. In fact, since you have XML Data Elements in your old Job, its possible that such a technique was already being used. In that way the two stages are similar...
Ernie
...as noted in the thread, this exercise will require that you learn how the new one works and build the solution appropriately.
If in fact you have multiple nodes beneath service-order that repeat, then you will need a more complex technique that builds those nodes beforehand.
The Best Practices document for xml will be helpful here. Get a copy of it if you don't have it already...you can find it in various threads in this forum.
It describes how you can build one "chunk" of XML that repeats, put it into a hash table and then do a join to pick it up later. In fact, since you have XML Data Elements in your old Job, its possible that such a technique was already being used. In that way the two stages are similar...
Ernie
Ernie Ostic
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
-
- Participant
- Posts: 1
- Joined: Thu Sep 15, 2011 6:20 am
- Location: hyderabad
Hi,
Try the same job in in 8.1 using server jobs hope u might get it, in parallel if the data is huge it might not work as from the seq file it checks for every 500 bytes one delimiter and also problem with the xpath may comeup
The document is hosted at Kim Duke's website.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers