Design XML(multiOccurance) using Hierarchial Data stage
Posted: Thu Jan 03, 2019 7:15 am
Hello,
I would like to have your views on designing a multi-occurance xml job. I am stuck up with the hierarchial data stage.
My requirement is that i have a table to read the orders which is like this
Order1, Product1, price, quantity, etc....
Order1, Product2, price, quantity, etcc...
Order2, Product1, price, quantity, etc....
Order3, product1, price, quantity, etc...
Order3, product2, price, quantity, etc...
order3, product3, price, quantity, etc...
Then i have to create a xml for each order with multiple products that it could have and send them to mq. Here in our case it would be 3 messages
First message
<Order1>
<Product>
<Product1>details</Product1>
<Product2>details</Product2>
/Product>
</Order1>
Second message
<Order2>
<Product>
<Product1>details</Product1>
/Product>
</Order2>
third message
<Order3>
<Product>
<Product1>details</Product1>
<Product2>details</Product2>
<Product3>details</Product3>
/Product>
</Order3>
With respect to the design, i thought of using hierarchial data and using H-join and xml-composer to do this. But it would need multiple inputs. but these inputs are sequential , hence grouping needs to be done. Personally I fear grouping as we work with millions of rows, as it could impact the perf.
Any pointers would be of great help. My experience with datastage is just 16 months, excuse me if my considerations are not correct.
I was also thinking of xml output, but would land in the same problem of grouping.
I would like to have your views on designing a multi-occurance xml job. I am stuck up with the hierarchial data stage.
My requirement is that i have a table to read the orders which is like this
Order1, Product1, price, quantity, etc....
Order1, Product2, price, quantity, etcc...
Order2, Product1, price, quantity, etc....
Order3, product1, price, quantity, etc...
Order3, product2, price, quantity, etc...
order3, product3, price, quantity, etc...
Then i have to create a xml for each order with multiple products that it could have and send them to mq. Here in our case it would be 3 messages
First message
<Order1>
<Product>
<Product1>details</Product1>
<Product2>details</Product2>
/Product>
</Order1>
Second message
<Order2>
<Product>
<Product1>details</Product1>
/Product>
</Order2>
third message
<Order3>
<Product>
<Product1>details</Product1>
<Product2>details</Product2>
<Product3>details</Product3>
/Product>
</Order3>
With respect to the design, i thought of using hierarchial data and using H-join and xml-composer to do this. But it would need multiple inputs. but these inputs are sequential , hence grouping needs to be done. Personally I fear grouping as we work with millions of rows, as it could impact the perf.
Any pointers would be of great help. My experience with datastage is just 16 months, excuse me if my considerations are not correct.
I was also thinking of xml output, but would land in the same problem of grouping.