on 12-02-2008 6:26 AM
Hi,
I am receiving a flat file with 6 rows.
Location, product, Movement Type, Date, Pieces,Cases
This is to be mapped to a standard proxy structure (ProductActivityNotification) such that
ProductActivity
--->Item (0..unbounded)
-
>Product
-
>Location
-
>SalesTimeSeries (0..1)
-
>Item (0..unbounded)
-
>ValidityPeriod (0..1)
-
>StartDateTime (0..1)
-
>EndDateTime (0..1)
-
>Quantity (0..1)
-
>ConsumptionTimeSeries (0..1)
-
>Item (0..unbounded)
-
>ValidityPeriod (0..1)
-
>StartDateTime (0..1)
-
>EndDateTime (0..1)
-
>Quantity (0..1)
-
>OnOrderTimeSeries (0..1)
-
>Item (0..unbounded)
-
>ValidityPeriod (0..1)
-
>StartDateTime (0..1)
-
>EndDateTime (0..1)
-
>Quantity (0..1)
Now the mapping conditions are:
Only one item (at the header level) is to be created for unique pair of Location, product and date.
Now if the Movement type is 03 then SalesTimeSeries is to be created, for 99 ConsumptionTimeSerries, 04 OnOrderTimeSeries
If the input is such that
A,B,0320081201,10,10
A,B,0320081202,19,10
A,B,0320081203,15,10
A,B,0420081201,10,10
here movement type precedes date.
Then output should be
<ProductActivity>
<item>
<location>A</location>
<product>B</product>
<SalesTimeSeries>
<item>
<ValidityPeriod>
<StartTime>20081201</StartTime>
<EndTime>20081201</EndTime>
</ValidityPeriod>
<Quantity>100</Quantity>
</item>
<item>
<ValidityPeriod>
<StartTime>20081202</StartTime>
<EndTime>20081202</EndTime>
</ValidityPeriod>
<Quantity>190</Quantity>
</item>
<item>
<ValidityPeriod>
<StartTime>20081203</StartTime>
<EndTime>20081203</EndTime>
</ValidityPeriod>
<Quantity>150</Quantity>
</item>
</SalesTimeSeries>
<ConsumptionTimeSeries>
<item>
<ValidityPeriod>
<StartTime>20081201</StartTime>
<EndTime>20081201</EndTime>
</ValidityPeriod>
<Quantity>100</Quantity>
</item>
</ConsumptionTimeSeries>
</item>
</ProductActivity>
Any idea how to go about this mapping?
Some mapping screen shots
[http://www.flickr.com/photos/23943732@N08/3076056747/|http://www.flickr.com/photos/23943732@N08/3076056747/]
[http://www.flickr.com/photos/23943732@N08/3076891958/|http://www.flickr.com/photos/23943732@N08/3076891958/]
[http://www.flickr.com/photos/23943732@N08/3076894086/|http://www.flickr.com/photos/23943732@N08/3076894086/]
[http://www.flickr.com/photos/23943732@N08/3076894090/|http://www.flickr.com/photos/23943732@N08/3076894090/]
regards,
Anirudh.
Edited by: Anirudh Vyas on Dec 2, 2008 12:03 PM
Hi Anirudh,
The output you've given is confusing. Quoting you: Only one item (at the header level) is to be created for unique pair of Location, product and date. But in the output sample you've given, there is only one for Product and Location, while the sub-categories are all there. Please clarify
Regards
Edited by: dspboys on Dec 3, 2008 3:55 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
92 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.