{"id":538,"date":"2020-12-17T09:58:42","date_gmt":"2020-12-17T08:58:42","guid":{"rendered":"https:\/\/ad-astra.com.pl\/?p=538"},"modified":"2021-01-22T10:57:47","modified_gmt":"2021-01-22T09:57:47","slug":"warstwa-biznesowa-w-data-warehouse-cloud-czesc-1","status":"publish","type":"post","link":"https:\/\/ad-astra.com.pl\/en\/2020\/12\/17\/warstwa-biznesowa-w-data-warehouse-cloud-czesc-1\/","title":{"rendered":"Business Layer and Data Warehouse Cloud - part 1"},"content":{"rendered":"<p><a href=\"https:\/\/ad-astra.com.pl\/en\/2020\/12\/24\/warstwa-biznesowa-w-data-warehouse-cloud-czesc-2\/\" target=\"_blank\" rel=\"noreferrer noopener\">Part 2<\/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>One of the latest updates for SAP Data Warehouse Cloud has brought a new, interesting functionality - the ability to define the business layer on existing objects and tables in the database.<\/p>\n\n\n\n<p>Now DWC has two data modeling layers, designed for different user groups - Data Layer (which we discussed in the previous article, link<a rel=\"noreferrer noopener\" href=\"https:\/\/ad-astra.com.pl\/en\/2020\/11\/10\/dwc\/\" target=\"_blank\"> HERE<\/a>) is for technical users. Business Layer, on the other hand, was created for business users, and is focused on a semantic approach to data.<\/p>\n\n\n\n<p>This solution allows business users to work independently of the IT department, while still ensuring the possibility of cooperation between the two groups. Business users can define business models that are separate from the physical data layer - they are an additional \"overlay\" for already existing data, allocated to specific objects from the Data Layer.<\/p>\n\n\n\n<p>The Business Layer itself is connected with the data layer in a flexible way - models created in the Data Layer can be corrected and changed without the need to modify the business models based on them, ensuring freedom for technical users.<\/p>\n\n\n\n<p><strong>Business Layer models are created top down.<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"434\" height=\"494\" src=\"https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/1.png\" alt=\"\" class=\"wp-image-540\" srcset=\"https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/1.png 434w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/1-264x300.png 264w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/1-11x12.png 11w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/1-176x200.png 176w\" sizes=\"(max-width: 434px) 100vw, 434px\" \/><\/figure>\n\n\n\n<p>Business users first create <strong>Business Entities<\/strong> (e.g. dimensions and analytical datasets) based on the objects from the Data Layer. Then, using these entities, they can define two kinds of models (<strong>fact i consumption<\/strong>) as the basis for data consumption. Based on the Consumption Model, they can create <strong>Perspective<\/strong>that can be used as data source in SAP Analytics Cloud.<\/p>\n\n\n\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/p>\n\n\n\n<p>The difference between <strong>Fact Model and Consumption Model<\/strong>&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"180\" height=\"156\" src=\"https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/2-1.png\" alt=\"\" class=\"wp-image-545\" srcset=\"https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/2-1.png 180w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/2-1-14x12.png 14w\" sizes=\"(max-width: 180px) 100vw, 180px\" \/><\/figure>\n\n\n\n<p>The Fact Model operates like a data configuration framework, it cannot be consumed directly, but it can be used repeatedly as the basis for Consumption Model. For example - if we want to create several models with the same calculated measures, we can create one Fact Model with the calculated measure, then use it as a basis for several Consumption Model.<\/p>\n\n\n\n<p><strong>Perspective<\/strong> work similar to Query in a classic data warehouse.<\/p>\n\n\n\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/p>\n\n\n\n<p>In this series of articles we will be discussing how to create and consume model using the Business Layer, operating on tables already loaded in the Data Layer (this data was presented in the previous article). In this part, we will focus on mapping Data Layer objects as Dimension type Business Entities.<\/p>\n\n\n\n<p>There are currently 4 tables in the Data Layer based on car sales \u2013<\/p>\n\n\n\n<p><strong>Sales_Table<\/strong> - transactional data<\/p>\n\n\n\n<p><strong>Dealer<\/strong> - text for the Dealer dimension<\/p>\n\n\n\n<p><strong>Dealer_Master<\/strong> \u2013 master data for the Dealer dimension (assigning the \u201cLocation\u201d attribute to the Dealer)<\/p>\n\n\n\n<p><strong>Location<\/strong> - text for the Location dimension<\/p>\n\n\n\n<p>Our first task is to recreate these tables in the Business Layer as business entities. To do this, go to Business Builder, then select <strong>New Dimension:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"614\" height=\"201\" src=\"https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/image-21.png\" alt=\"\" class=\"wp-image-547\" srcset=\"https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/image-21.png 614w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/image-21-300x98.png 300w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/image-21-535x175.png 535w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/image-21-16x5.png 16w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/image-21-611x200.png 611w\" sizes=\"(max-width: 614px) 100vw, 614px\" \/><\/figure>\n\n\n\n<p>From the available Data Layer objects, select Dealer and then click Create:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"519\" height=\"426\" src=\"https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/image-22.png\" alt=\"\" class=\"wp-image-548\" srcset=\"https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/image-22.png 519w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/image-22-300x246.png 300w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/image-22-16x12.png 16w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/image-22-244x200.png 244w\" sizes=\"(max-width: 519px) 100vw, 519px\" \/><\/figure>\n\n\n\n<p>(Dealer table preview):<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"361\" height=\"119\" src=\"https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/image-23.png\" alt=\"\" class=\"wp-image-549\" srcset=\"https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/image-23.png 361w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/image-23-300x99.png 300w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/image-23-16x5.png 16w\" sizes=\"(max-width: 361px) 100vw, 361px\" \/><\/figure>\n\n\n\n<p>The Dimension configuration screen will appear.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"982\" height=\"376\" src=\"https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/image-24.png\" alt=\"\" class=\"wp-image-550\" srcset=\"https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/image-24.png 982w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/image-24-300x115.png 300w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/image-24-768x294.png 768w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/image-24-535x205.png 535w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/image-24-16x6.png 16w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/image-24-522x200.png 522w\" sizes=\"(max-width: 982px) 100vw, 982px\" \/><\/figure>\n\n\n\n<p>For the <strong>Business Name<\/strong> field, enter the name for our unit (in this case TXT_DEALER). To enable access to our dimension, select the <strong>Allow Public Data Access<\/strong>option. On the right side of the screen is BB's built-in <strong>version control system<\/strong>. We can set the title, description and status of our unit (we leave these fields unchanged). Save the changes with the <strong>Save Button<\/strong>.<\/p>\n\n\n\n<p>At the top of the screen, we see tabs that allow us to edit the dimension.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"485\" height=\"77\" src=\"https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/image-25.png\" alt=\"\" class=\"wp-image-552\" srcset=\"https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/image-25.png 485w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/image-25-300x48.png 300w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/image-25-16x3.png 16w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/image-25-480x77.png 480w\" sizes=\"(max-width: 485px) 100vw, 485px\" \/><\/figure>\n\n\n\n<p>For the Dealer we need:<\/p>\n\n\n\n<ol type=\"a\"><li><strong>Attributes<\/strong> \u2013attributes are objects that can be used for navigation during data analysis (not to be confused with attributes in classic BW!)<\/li><li><strong>Key Definition<\/strong> (we need to set the dealer ID as its dimension key, which will allow us to connect to other entities).<\/li><\/ol>\n\n\n\n<p>Go to the Attributes tab and press the plus button to add a new attribute. Then, in the <strong>Source Attribute<\/strong> field, select the object from the source table that the attribute will be based on. In our example, we select the field containing descriptions for the Dealer.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"605\" height=\"279\" src=\"https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/image-27.png\" alt=\"\" class=\"wp-image-555\" srcset=\"https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/image-27.png 605w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/image-27-300x138.png 300w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/image-27-535x247.png 535w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/image-27-16x7.png 16w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/image-27-434x200.png 434w\" sizes=\"(max-width: 605px) 100vw, 605px\" \/><\/figure>\n\n\n\n<p>Next, we want to set the <strong>Identifier<\/strong> value for this attribute. To do this, in the Identifier field, select the Use Identifier option. Next, as the Identifier Attribute set the object containing the Dealer ID (in this case, the \u201cDealer\u201d field). Press Save to save the changes, we can also rename the attribute (in our case we remove the suffix \u201c_text\u201d from the name)<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"215\" height=\"126\" src=\"https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/image-28.png\" alt=\"\" class=\"wp-image-556\" srcset=\"https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/image-28.png 215w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/image-28-16x9.png 16w\" sizes=\"(max-width: 215px) 100vw, 215px\" \/><\/figure>\n\n\n\n<p>We can now preview the data by clicking on the Data Preview button in the upper right corner. Due to our previous work, the attribute can be displayed as an ID or description.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"120\" height=\"161\" src=\"https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/image-29.png\" alt=\"\" class=\"wp-image-557\" srcset=\"https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/image-29.png 120w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/image-29-9x12.png 9w\" sizes=\"(max-width: 120px) 100vw, 120px\" \/><\/figure>\n\n\n\n<p>Then go to the Key Definitions tab and click the plus button to create new entry. In the <strong>KeyField<\/strong> we select object that defines the dimension\u2019s key (in our example we select the Dealers ID value). Then enter the name of the key in the <strong>KeyField Title<\/strong> and <strong>KeyTitle<\/strong> fields. Click the <strong>Verify<\/strong>button to check if the key has been correctly defined, and then save it.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"605\" height=\"241\" src=\"https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/image-30.png\" alt=\"\" class=\"wp-image-558\" srcset=\"https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/image-30.png 605w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/image-30-300x120.png 300w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/image-30-535x213.png 535w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/image-30-16x6.png 16w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/image-30-502x200.png 502w\" sizes=\"(max-width: 605px) 100vw, 605px\" \/><\/figure>\n\n\n\n<p>The Business Entity Key is used to link it with other Entities.<\/p>\n\n\n\n<p>This completes the work on our first Business Entity. The exact same steps can be taken to create the Location Business Entity \u2013 the result should look like the image below.<\/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-31.png\" alt=\"\" class=\"wp-image-559\" srcset=\"https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/image-31.png 431w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/image-31-300x59.png 300w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2020\/12\/image-31-16x3.png 16w\" sizes=\"(max-width: 431px) 100vw, 431px\" \/><\/figure>\n\n\n\n<p>In the next article we will create Business Entities that contain Transaction Data (Analytial Dataset) and Master Data for the Dealer. See you there!<\/p>","protected":false},"excerpt":{"rendered":"<p>Cz\u0119\u015b\u0107 2 Cz\u0119\u015b\u0107 3 Jedna z ostatnich aktualizacji dla hurtownii danych w chmurze SAP Data Warehouse Cloud przynios\u0142a now\u0105, ciekaw\u0105 funkcjonalno\u015b\u0107 \u2013 mo\u017cliwo\u015b\u0107 definiowania warstwy biznesowej na ju\u017c istniej\u0105cych obiektach i tabelach w bazie. Teraz DWC posiada dwie warstwy modelowania danych, zaprojektowane dla r\u00f3\u017cnych grup u\u017cytkownik\u00f3w \u2013 Data Layer (kt\u00f3ry &hellip;<\/p>","protected":false},"author":2,"featured_media":545,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[17,13],"tags":[34,35,10,21],"_links":{"self":[{"href":"https:\/\/ad-astra.com.pl\/en\/wp-json\/wp\/v2\/posts\/538"}],"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=538"}],"version-history":[{"count":12,"href":"https:\/\/ad-astra.com.pl\/en\/wp-json\/wp\/v2\/posts\/538\/revisions"}],"predecessor-version":[{"id":734,"href":"https:\/\/ad-astra.com.pl\/en\/wp-json\/wp\/v2\/posts\/538\/revisions\/734"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ad-astra.com.pl\/en\/wp-json\/wp\/v2\/media\/545"}],"wp:attachment":[{"href":"https:\/\/ad-astra.com.pl\/en\/wp-json\/wp\/v2\/media?parent=538"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ad-astra.com.pl\/en\/wp-json\/wp\/v2\/categories?post=538"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ad-astra.com.pl\/en\/wp-json\/wp\/v2\/tags?post=538"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}