on 02-04-2014 12:15 PM
Dear all,
I need some help with the conversion of flat data to structural data.
Level 1 is not the problem. What I would do here is:
WELT_NR -> RemoveContexts -> SplitByValue (Value change) -> CollapsContexts -> SplitByValue (Each value) -> OrgSectorId
... the same for node OrgSector_FN_1
The problem is a bit the depending nodes and also the depending descriptions on each level.
Example:
<?xml version="1.0" encoding="UTF-8"?>
<ns0:MT_DB_Welt_WSOGruppe_WSO xmlns:ns0="urn:eb.de:sys:DB">
<row>
<WELT_NR>1</WELT_NR>
<WELT_BEZ>1</WELT_BEZ>
<LAGER_GRP_NR>1</LAGER_GRP_NR>
<LAGER_GRP_BEZ>1</LAGER_GRP_BEZ>
<LAGER_NR>1</LAGER_NR>
<LAGER_BEZ>1</LAGER_BEZ>
</row>
<row>
<WELT_NR>1</WELT_NR>
<WELT_BEZ>1</WELT_BEZ>
<LAGER_GRP_NR>2</LAGER_GRP_NR>
<LAGER_GRP_BEZ>2</LAGER_GRP_BEZ>
<LAGER_NR>1</LAGER_NR>
<LAGER_BEZ>1</LAGER_BEZ>
</row>
<row>
<WELT_NR>1</WELT_NR>
<WELT_BEZ>1</WELT_BEZ>
<LAGER_GRP_NR>2</LAGER_GRP_NR>
<LAGER_GRP_BEZ>2</LAGER_GRP_BEZ>
<LAGER_NR>2</LAGER_NR>
<LAGER_BEZ>2</LAGER_BEZ>
</row>
<row>
<WELT_NR>1</WELT_NR>
<WELT_BEZ>1</WELT_BEZ>
<LAGER_GRP_NR>3</LAGER_GRP_NR>
<LAGER_GRP_BEZ>3</LAGER_GRP_BEZ>
<LAGER_NR>1</LAGER_NR>
<LAGER_BEZ>1</LAGER_BEZ>
</row>
<row>
<WELT_NR>2</WELT_NR>
<WELT_BEZ>2</WELT_BEZ>
<LAGER_GRP_NR>1</LAGER_GRP_NR>
<LAGER_GRP_BEZ>1</LAGER_GRP_BEZ>
<LAGER_NR>1</LAGER_NR>
<LAGER_BEZ>1</LAGER_BEZ>
</row>
</ns0:MT_DB_Welt_WSOGruppe_WSO>
I would appreciate if s.o. can illustrate me the solution. Priority is the usage of the grafical mapping.
Thx in advance.
Kind regards.
André
Hi Andre,
From your above post , i understood that you want to WELT_NR value into respective occurrence of OrgSectorId.
You are getting first occurrence because you used collapse context (it will pick first value of the context and discards remaining values in the queue).
Please try mapping as,
row -> OrgSector_FN_1 and map remaining source fields to destination (make sure you mapped respective parent nodes also).
Thanks
Hari.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Hari,
would work, but the result is not compressed!
This result would look like this:
<ns1:OrgHierarchy_FN>
<ns2:OrgSector_FN_1 class="entity" xmlns:ns2="http://schemas.microsoft.com/dynamics/2008/01/documents/OrgHierarchy_FN">
<ns2:Description>1</ns2:Description>
<ns2:OrgSectorId>1</ns2:OrgSectorId>
<ns2:OrgMainDivision_FN_1 class="entity">
<ns2:Description>1</ns2:Description>
<ns2:OrgMainDivisionId>1</ns2:OrgMainDivisionId>
<ns2:OrgDivision_FN_1 class="entity">
<ns2:Description>1</ns2:Description>
<ns2:OrgDivisionId>1</ns2:OrgDivisionId>
</ns2:OrgDivision_FN_1>
</ns2:OrgMainDivision_FN_1>
</ns2:OrgSector_FN_1>
<ns2:OrgSector_FN_1 class="entity" xmlns:ns2="http://schemas.microsoft.com/dynamics/2008/01/documents/OrgHierarchy_FN">
<ns2:Description>1</ns2:Description>
<ns2:OrgSectorId>1</ns2:OrgSectorId>
<ns2:OrgMainDivision_FN_1 class="entity">
<ns2:Description>2</ns2:Description>
<ns2:OrgMainDivisionId>2</ns2:OrgMainDivisionId>
<ns2:OrgDivision_FN_1 class="entity">
<ns2:Description>2</ns2:Description>
<ns2:OrgDivisionId>2</ns2:OrgDivisionId>
</ns2:OrgDivision_FN_1>
</ns2:OrgMainDivision_FN_1>
</ns2:OrgSector_FN_1>
<ns2:OrgSector_FN_1 class="entity" xmlns:ns2="http://schemas.microsoft.com/dynamics/2008/01/documents/OrgHierarchy_FN">
<ns2:Description>1</ns2:Description>
<ns2:OrgSectorId>1</ns2:OrgSectorId>
<ns2:OrgMainDivision_FN_1 class="entity">
<ns2:Description>2</ns2:Description>
<ns2:OrgMainDivisionId>2</ns2:OrgMainDivisionId>
<ns2:OrgDivision_FN_1 class="entity">
<ns2:Description>3</ns2:Description>
<ns2:OrgDivisionId>3</ns2:OrgDivisionId>
</ns2:OrgDivision_FN_1>
</ns2:OrgMainDivision_FN_1>
</ns2:OrgSector_FN_1>
<ns2:OrgSector_FN_1 class="entity" xmlns:ns2="http://schemas.microsoft.com/dynamics/2008/01/documents/OrgHierarchy_FN">
<ns2:Description>3</ns2:Description>
<ns2:OrgSectorId>3</ns2:OrgSectorId>
<ns2:OrgMainDivision_FN_1 class="entity">
<ns2:Description>3</ns2:Description>
<ns2:OrgMainDivisionId>3</ns2:OrgMainDivisionId>
<ns2:OrgDivision_FN_1 class="entity">
<ns2:Description>3</ns2:Description>
<ns2:OrgDivisionId>3</ns2:OrgDivisionId>
</ns2:OrgDivision_FN_1>
</ns2:OrgMainDivision_FN_1>
</ns2:OrgSector_FN_1>
</ns1:OrgHierarchy_FN>
I would prefer a compressed version like this:
<ns1:OrgHierarchy_FN>
<ns2:OrgSector_FN_1 class="entity" xmlns:ns2="http://schemas.microsoft.com/dynamics/2008/01/documents/OrgHierarchy_FN">
<ns2:Description>1</ns2:Description>
<ns2:OrgSectorId>1</ns2:OrgSectorId>
<ns2:OrgMainDivision_FN_1 class="entity">
<ns2:Description>1</ns2:Description>
<ns2:OrgMainDivisionId>1</ns2:OrgMainDivisionId>
<ns2:OrgDivision_FN_1 class="entity">
<ns2:Description>1</ns2:Description>
<ns2:OrgDivisionId>1</ns2:OrgDivisionId>
</ns2:OrgDivision_FN_1>
</ns2:OrgMainDivision_FN_1>
<ns2:OrgMainDivision_FN_1 class="entity">
<ns2:Description>2</ns2:Description>
<ns2:OrgMainDivisionId>2</ns2:OrgMainDivisionId>
<ns2:OrgDivision_FN_1 class="entity">
<ns2:Description>2</ns2:Description>
<ns2:OrgDivisionId>2</ns2:OrgDivisionId>
</ns2:OrgDivision_FN_1>
<ns2:OrgDivision_FN_1 class="entity">
<ns2:Description>3</ns2:Description>
<ns2:OrgDivisionId>3</ns2:OrgDivisionId>
</ns2:OrgDivision_FN_1>
</ns2:OrgMainDivision_FN_1>
</ns2:OrgSector_FN_1>
<ns2:OrgSector_FN_1 class="entity" xmlns:ns2="http://schemas.microsoft.com/dynamics/2008/01/documents/OrgHierarchy_FN">
<ns2:Description>3</ns2:Description>
<ns2:OrgSectorId>3</ns2:OrgSectorId>
<ns2:OrgMainDivision_FN_1 class="entity">
<ns2:Description>3</ns2:Description>
<ns2:OrgMainDivisionId>3</ns2:OrgMainDivisionId>
<ns2:OrgDivision_FN_1 class="entity">
<ns2:Description>3</ns2:Description>
<ns2:OrgDivisionId>3</ns2:OrgDivisionId>
</ns2:OrgDivision_FN_1>
</ns2:OrgMainDivision_FN_1>
</ns2:OrgSector_FN_1>
</ns1:OrgHierarchy_FN>
KR
André
Hi Andre,
you can achieve this in graphical mapping if you know what is the relation between child and parent node in the source structure. So please provide the relationship between them to provide inputs.
regards,
Harish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Harish,
the relation is the following as you can see on screenshot of the first post.
OrgSectorID = WELT_NR
Description (on the same level of the target) = WELT_BEZ
1:N WELT_NR : LAGER_GRP_NR
OrgMainDivisionID = LAGER_GRP_NR depending on the OrgSectorID/WELT_NR
Description (on the same level of the target) = LAGER_GRP_BEZ
1:N LAGER_GRP_NR: LAGER_NR
OrgDivisionID = LAGER_NR depending on the OrgMainDivisionID/LAGER_GRP_NR
Description (on the same level of the target) = LAGER_BEZ
Level 1 would look like this...in my opinion:
But honestly I have currently no clue how to get onwards.
Thx in advance.
KR
André
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
94 | |
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.