Advertisement
Guest User

Untitled

a guest
May 6th, 2015
251
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.71 KB | None | 0 0
  1. Hi Oli,
  2. The Siebel Datamapper is indeed powerful, but some years ago I came across a requirement which I could not achieve using declarative approach, and had to fallback to scripting the property sets.
  3.  
  4. Here is a rough explanation.
  5.  
  6. This is the incoming source XML from the end system:
  7.  
  8. <root>
  9. <Quarter>
  10. <profit q="1">80</profit>
  11. <profit q="2">90</profit>
  12. <profit q="3">70</profit>
  13. <profit q="4">85</profit>
  14. </Quarter>
  15. <Quarter>
  16. <profit q="1">80</profit>
  17. <profit q="2">90</profit>
  18. <profit q="3">70</profit>
  19. <profit q="4">85</profit>
  20. </Quarter>
  21. <Quarter>
  22. <profit q="1">80</profit>
  23. <profit q="2">90</profit>
  24. <profit q="3">70</profit>
  25. <profit q="4">85</profit>
  26. </Quarter>
  27. <Quarter>
  28. <profit q="1">80</profit>
  29. <profit q="2">90</profit>
  30. <profit q="3">70</profit>
  31. <profit q="4">85</profit>
  32. </Quarter>
  33. </root>
  34.  
  35.  
  36.  
  37. And this had to be mapped to this target in Siebel :
  38.  
  39.  
  40. <root>
  41. <Quarter>
  42. <q1>80</q1>
  43. <q2>90</q2>
  44. <q3>70</q3>
  45. <q4>85</q4>
  46. </Quarter>
  47. <Quarter>
  48. <q1>80</q1>
  49. <q2>90</q2>
  50. <q3>70</q3>
  51. <q4>85</q4>
  52. </Quarter>
  53. <Quarter>
  54. <q1>80</q1>
  55. <q2>90</q2>
  56. <q3>70</q3>
  57. <q4>85</q4>
  58. </Quarter>
  59. <Quarter>
  60. <q1>80</q1>
  61. <q2>90</q2>
  62. <q3>70</q3>
  63. <q4>85</q4>
  64. </Quarter>
  65. </root>
  66.  
  67.  
  68. Basically in the source, under each quarter, this is one one record (for the lack of a better term) for each quarter, so 4 records. But in the target, there is only record for the entire year , with 4 different fields corresponding to each quarter. So this is a row-to-column conversion.
  69.  
  70. Maybe I missed something back then, but can this kind of mapping be achieved using declararive datamappers and NO scripting ?
  71.  
  72. Thanks
  73.  
  74. cleartext.blogspot.com
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement