{"id":566,"date":"2020-12-24T10:42:00","date_gmt":"2020-12-24T09:42:00","guid":{"rendered":"https:\/\/ad-astra.com.pl\/?p=566"},"modified":"2021-01-22T10:57:18","modified_gmt":"2021-01-22T09:57:18","slug":"warstwa-biznesowa-w-data-warehouse-cloud-czesc-2","status":"publish","type":"post","link":"https:\/\/ad-astra.com.pl\/en\/2020\/12\/24\/warstwa-biznesowa-w-data-warehouse-cloud-czesc-2\/","title":{"rendered":"Business Layer and Data Warehouse Cloud \u2013 part 2"},"content":{"rendered":"<p><a href=\"https:\/\/ad-astra.com.pl\/en\/2020\/12\/17\/warstwa-biznesowa-w-data-warehouse-cloud-czesc-1\/\" data-type=\"URL\" data-id=\"https:\/\/ad-astra.com.pl\/2020\/12\/17\/warstwa-biznesowa-w-data-warehouse-cloud-czesc-1\/\" target=\"_blank\" rel=\"noreferrer noopener\">Part 1 <\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/ad-astra.com.pl\/en\/2021\/01\/04\/warstwa-biznesowa-w-data-warehouse-cloud-czesc-3\/\" target=\"_blank\" rel=\"noreferrer noopener\">Part 3<\/a><\/p>\n\n\n\n<p>In the previous article, we created Dimension Type Business Entities  based on text tables for Dealer and Location.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"431\" height=\"85\" src=\"https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/image-32.png\" alt=\"\" class=\"wp-image-567\" srcset=\"https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/image-32.png 431w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/image-32-300x59.png 300w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/image-32-16x3.png 16w\" sizes=\"(max-width: 431px) 100vw, 431px\" \/><\/figure>\n\n\n\n<p>In this article, we will focus on two topics:<\/p>\n\n\n\n<ol type=\"1\"><li>Create Business Entities based on master data for the dealer<\/li><li>Create Business Entities based on transactional data (Analytical Dataset)<\/li><\/ol>\n\n\n\n<p><strong>Part 1<\/strong><\/p>\n\n\n\n<p>We will start by creating Business Entity based on the Dealer_Master table. This table contains the location allocation for the dealers.<\/p>\n\n\n\n<p>(Data structure preview for Dealer_Master):<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"327\" height=\"199\" src=\"https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/image-33.png\" alt=\"\" class=\"wp-image-568\" srcset=\"https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/image-33.png 327w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/image-33-300x183.png 300w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/image-33-16x10.png 16w\" sizes=\"(max-width: 327px) 100vw, 327px\" \/><\/figure>\n\n\n\n<p>For this Entity, we need to :<\/p>\n\n\n\n<ol type=\"a\"><li><strong>Create two keys<\/strong> - one for the Dealer and second one for the Location. We will use them to link the Entity to objects containing Dimension descriptions from previous article<\/li><\/ol>\n\n\n\n<p>To do this, go back to Business Builder and click on New Dimension. We choose the Dealer_Master table as the source.<\/p>\n\n\n\n<p>Set the public acess data for Entity, change the name (in our case - MD_DEALER) and save. Then select the Attributes tab.<\/p>\n\n\n\n<p>Using the button located next to the Plus Button, we can quickly add all the fields contained in our source. Next, go to the Key Definitions tab.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"605\" height=\"161\" src=\"https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/image-34.png\" alt=\"\" class=\"wp-image-569\" srcset=\"https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/image-34.png 605w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/image-34-300x80.png 300w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/image-34-535x142.png 535w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/image-34-16x4.png 16w\" sizes=\"(max-width: 605px) 100vw, 605px\" \/><\/figure>\n\n\n\n<p>Using the plus button we can create a new key definition. As <strong>KeyField<\/strong> select the Dealer field, in <strong>KeyField Title<\/strong> and <strong>KeyField<\/strong> enter \u201cDealerID\u201d. Verify and save. Next, we create another key, this time based on the Location field. Name it LocationID. The result should look like the image below.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"983\" height=\"158\" src=\"https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/image-36.png\" alt=\"\" class=\"wp-image-572\" srcset=\"https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/image-36.png 983w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/image-36-300x48.png 300w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/image-36-768x123.png 768w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/image-36-535x86.png 535w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/image-36-16x3.png 16w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/image-36-941x151.png 941w\" sizes=\"(max-width: 983px) 100vw, 983px\" \/><\/figure>\n\n\n\n<p>Next, go to the <strong>Associations<\/strong>. <strong>Entities that are linked via associations are available as attributes when creating a Consumption Model.<\/strong> As we want to have access to previously created dimension descriptions in the model, click the plus button to add a new association.<\/p>\n\n\n\n<p>For the <strong>Target Business Entity<\/strong> field select TXT_DEALER Entity and click Apply.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"605\" height=\"207\" src=\"https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/image-39.png\" alt=\"\" class=\"wp-image-575\" srcset=\"https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/image-39.png 605w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/image-39-300x103.png 300w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/image-39-535x183.png 535w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/image-39-16x5.png 16w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/image-39-585x200.png 585w\" sizes=\"(max-width: 605px) 100vw, 605px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"185\" height=\"121\" src=\"https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/image-40.png\" alt=\"\" class=\"wp-image-576\" srcset=\"https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/image-40.png 185w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/image-40-16x10.png 16w\" sizes=\"(max-width: 185px) 100vw, 185px\" \/><\/figure>\n\n\n\n<p>For the <strong>Foreign Key Field<\/strong> we select the Entity field that will be used for key mapping. In this case, we select the Dealer object.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"552\" height=\"191\" src=\"https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/1-1.png\" alt=\"\" class=\"wp-image-579\" srcset=\"https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/1-1.png 552w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/1-1-300x104.png 300w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/1-1-535x185.png 535w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/1-1-16x6.png 16w\" sizes=\"(max-width: 552px) 100vw, 552px\" \/><\/figure>\n\n\n\n<p>Next we create another association and perform the same steps for the TXT_LOCATION object:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"637\" height=\"178\" src=\"https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/2-2.png\" alt=\"\" class=\"wp-image-580\" srcset=\"https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/2-2.png 637w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/2-2-300x84.png 300w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/2-2-535x149.png 535w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/2-2-16x4.png 16w\" sizes=\"(max-width: 637px) 100vw, 637px\" \/><\/figure>\n\n\n\n<p><strong>Part 2<\/strong><\/p>\n\n\n\n<p>Now we will try to create Analytical Dataset Entity using transactional data. To do this, go to Business Builder and select New Analytical Dataset, and then select the SALES_TABLE table.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"687\" height=\"160\" src=\"https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/3.png\" alt=\"\" class=\"wp-image-581\" srcset=\"https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/3.png 687w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/3-300x70.png 300w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/3-535x125.png 535w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/3-16x4.png 16w\" sizes=\"(max-width: 687px) 100vw, 687px\" \/><\/figure>\n\n\n\n<p>(Data structure preview for SALES_TABLE):<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"553\" height=\"161\" src=\"https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/image-43.png\" alt=\"\" class=\"wp-image-583\" srcset=\"https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/image-43.png 553w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/image-43-300x87.png 300w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/image-43-535x156.png 535w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/image-43-16x5.png 16w\" sizes=\"(max-width: 553px) 100vw, 553px\" \/><\/figure>\n\n\n\n<p>Switch on the Public Data Access option and change the name of the Entity (in our case \u201cFCT_SALES\u201d). Then, to define the measures, go to the <strong>Measures<\/strong>tab. By using the button next to the Plus button, we can quickly add all the measures to the model.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"810\" height=\"311\" src=\"https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/4.png\" alt=\"\" class=\"wp-image-584\" srcset=\"https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/4.png 810w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/4-300x115.png 300w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/4-768x295.png 768w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/4-535x205.png 535w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/4-16x6.png 16w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/4-521x200.png 521w\" sizes=\"(max-width: 810px) 100vw, 810px\" \/><\/figure>\n\n\n\n<p>Then we can edit each of the added measures to define the appropriate unit or currency field.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"812\" height=\"255\" src=\"https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/5.png\" alt=\"\" class=\"wp-image-585\" srcset=\"https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/5.png 812w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/5-300x94.png 300w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/5-768x241.png 768w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/5-535x168.png 535w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/5-16x5.png 16w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/5-637x200.png 637w\" sizes=\"(max-width: 812px) 100vw, 812px\" \/><\/figure>\n\n\n\n<p>Teraz po\u0142\u0105czymy si\u0119 utworzon\u0105 przed chwil\u0105 jednostk\u0105 zawieraj\u0105ca dane podstawowe dla Dealera. W&nbsp;tym celu przechodzimy do zak\u0142adki <strong>Associations<\/strong> tab and add a new association using the plus button. Select MD_DEALER from the available Entities.<\/p>\n\n\n\n<p>For the <strong>Foreign Key Field<\/strong> select the Dealer object and then save.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"811\" height=\"214\" src=\"https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/6.png\" alt=\"\" class=\"wp-image-586\" srcset=\"https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/6.png 811w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/6-300x79.png 300w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/6-768x203.png 768w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/6-535x141.png 535w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/6-16x4.png 16w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/6-758x200.png 758w\" sizes=\"(max-width: 811px) 100vw, 811px\" \/><\/figure>\n\n\n\n<p>By adding this association, the Dealer and Location fields will now be available in the model. Below is an overview of the structure we have created so far<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"354\" height=\"237\" src=\"https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/image-44.png\" alt=\"\" class=\"wp-image-589\" srcset=\"https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/image-44.png 354w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/image-44-300x201.png 300w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/image-44-16x12.png 16w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/image-44-299x200.png 299w\" sizes=\"(max-width: 354px) 100vw, 354px\" \/><\/figure>\n\n\n\n<p>In the next article, we will use the previously created Business Entities to create a model and then consume it in SAP Analytics Cloud. <\/p>","protected":false},"excerpt":{"rendered":"<p>Cz\u0119\u015b\u0107 1 Cz\u0119\u015b\u0107 3 W poprzednim artykule utworzyli\u015bmy jednostki biznesowe na podstawie tabel z opisami dla wymiar\u00f3w. W tym artykule skupimy si\u0119 na dw\u00f3ch zagadnieniach : Tworzenie jednostek biznesowych dla danych podstawowych dla Dealera Tworzenie jednostek biznesowych dla danych transakcyjnych (Analytical Dataset) Cz\u0119\u015b\u0107 1 Zaczniemy od utworzenia jednostki biznesowej na &hellip;<\/p>","protected":false},"author":2,"featured_media":589,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[17,13],"tags":[34,38,10,43],"_links":{"self":[{"href":"https:\/\/ad-astra.com.pl\/en\/wp-json\/wp\/v2\/posts\/566"}],"collection":[{"href":"https:\/\/ad-astra.com.pl\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ad-astra.com.pl\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ad-astra.com.pl\/en\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/ad-astra.com.pl\/en\/wp-json\/wp\/v2\/comments?post=566"}],"version-history":[{"count":8,"href":"https:\/\/ad-astra.com.pl\/en\/wp-json\/wp\/v2\/posts\/566\/revisions"}],"predecessor-version":[{"id":736,"href":"https:\/\/ad-astra.com.pl\/en\/wp-json\/wp\/v2\/posts\/566\/revisions\/736"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ad-astra.com.pl\/en\/wp-json\/wp\/v2\/media\/589"}],"wp:attachment":[{"href":"https:\/\/ad-astra.com.pl\/en\/wp-json\/wp\/v2\/media?parent=566"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ad-astra.com.pl\/en\/wp-json\/wp\/v2\/categories?post=566"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ad-astra.com.pl\/en\/wp-json\/wp\/v2\/tags?post=566"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}