{"id":711,"date":"2021-01-26T11:20:39","date_gmt":"2021-01-26T10:20:39","guid":{"rendered":"https:\/\/ad-astra.com.pl\/?p=711"},"modified":"2021-01-26T11:20:40","modified_gmt":"2021-01-26T10:20:40","slug":"data-warehouse-cloud-wymiar-czasu","status":"publish","type":"post","link":"https:\/\/ad-astra.com.pl\/en\/2021\/01\/26\/data-warehouse-cloud-wymiar-czasu\/","title":{"rendered":"Data Warehouse Cloud - Time Dimension"},"content":{"rendered":"<p>As an addition to the previous articles on Business Layer in SAP Data Warehouse Cloud, we will also present how to quickly and easily add a time dimension to this layer using functionalities built in DWC. We will rely on data and objects created in previous publications (you can find part one <a href=\"https:\/\/ad-astra.com.pl\/en\/2020\/12\/17\/warstwa-biznesowa-w-data-warehouse-cloud-czesc-1\/\" target=\"_blank\" rel=\"noreferrer noopener\">HERE<\/a>) .<\/p>\n\n\n\n<p>First, we must use the built-in system functionality that automatically creates time tables and its attributes. For this purpose, we go to the management screen of our space (<strong>Space Management<\/strong>). In the <strong>Time Data<\/strong> area, select the <strong>+<\/strong> <strong>Create Time Tables and Dimensions option.<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"110\" height=\"182\" src=\"https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2021\/01\/image.png\" alt=\"\" class=\"wp-image-712\" srcset=\"https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2021\/01\/image.png 110w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2021\/01\/image-7x12.png 7w\" sizes=\"(max-width: 110px) 100vw, 110px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"605\" height=\"97\" src=\"https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2021\/01\/image-1.png\" alt=\"\" class=\"wp-image-713\" srcset=\"https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2021\/01\/image-1.png 605w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2021\/01\/image-1-300x48.png 300w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2021\/01\/image-1-535x86.png 535w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2021\/01\/image-1-16x3.png 16w\" sizes=\"(max-width: 605px) 100vw, 605px\" \/><\/figure>\n\n\n\n<p>In the newly opened window, we can adjust few parameters - <strong>change the business name<\/strong> for the table and its individual elements (year, quarter, etc.) or <strong>set the allowed time range.<\/strong> To complete the process, click the <strong>Create button.<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"447\" height=\"450\" src=\"https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2021\/01\/image-2.png\" alt=\"\" class=\"wp-image-715\" srcset=\"https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2021\/01\/image-2.png 447w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2021\/01\/image-2-298x300.png 298w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2021\/01\/image-2-150x150.png 150w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2021\/01\/image-2-12x12.png 12w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2021\/01\/image-2-199x200.png 199w\" sizes=\"(max-width: 447px) 100vw, 447px\" \/><\/figure>\n\n\n\n<p>The system will automatically create the appropriate objects in Data Builder. The area management screen should look like this:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"574\" height=\"102\" src=\"https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2021\/01\/image-3.png\" alt=\"\" class=\"wp-image-716\" srcset=\"https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2021\/01\/image-3.png 574w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2021\/01\/image-3-300x53.png 300w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2021\/01\/image-3-535x95.png 535w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2021\/01\/image-3-16x3.png 16w\" sizes=\"(max-width: 574px) 100vw, 574px\" \/><\/figure>\n\n\n\n<p>Data Builder View:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"516\" height=\"148\" src=\"https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2021\/01\/image-4.png\" alt=\"\" class=\"wp-image-717\" srcset=\"https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2021\/01\/image-4.png 516w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2021\/01\/image-4-300x86.png 300w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2021\/01\/image-4-16x5.png 16w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2021\/01\/image-4-512x148.png 512w\" sizes=\"(max-width: 516px) 100vw, 516px\" \/><\/figure>\n\n\n\n<p>To consume these objects in the Business Layer, we must first accomplish following 3 steps:<\/p>\n\n\n\n<ol type=\"1\"><li><strong>Create a Business Entity based on time table<\/strong><\/li><li><strong>Definie the Key for this Business Entity<\/strong><\/li><li><strong>Link the Business Entity with transactional data using the Key<\/strong><\/li><\/ol>\n\n\n\n<p><strong>Step 1<\/strong><\/p>\n\n\n\n<p>Go to <strong>Business Builder<\/strong> and choose <strong>New Dimension. <\/strong>From the available objects, select <strong>Time Dimension \u2013 Day<\/strong> and click on the <strong>Create button.<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"605\" height=\"195\" src=\"https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2021\/01\/image-5.png\" alt=\"\" class=\"wp-image-719\" srcset=\"https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2021\/01\/image-5.png 605w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2021\/01\/image-5-300x97.png 300w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2021\/01\/image-5-535x172.png 535w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2021\/01\/image-5-16x5.png 16w\" sizes=\"(max-width: 605px) 100vw, 605px\" \/><\/figure>\n\n\n\n<p>On the Entity edit screen, go to the <strong>Attributes <\/strong>field and use the button next to the plus to view all the attributes that the system automatically added to our object. In this example, we select <strong>Date<\/strong>, <strong>Quarter<\/strong> and <strong>Year<\/strong> and then click on the <strong>Apply button.<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"117\" height=\"69\" src=\"https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2021\/01\/image-6.png\" alt=\"\" class=\"wp-image-720\" srcset=\"https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2021\/01\/image-6.png 117w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2021\/01\/image-6-16x9.png 16w\" sizes=\"(max-width: 117px) 100vw, 117px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"215\" height=\"315\" src=\"https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2021\/01\/image-7.png\" alt=\"\" class=\"wp-image-721\" srcset=\"https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2021\/01\/image-7.png 215w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2021\/01\/image-7-205x300.png 205w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2021\/01\/image-7-8x12.png 8w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2021\/01\/image-7-137x200.png 137w\" sizes=\"(max-width: 215px) 100vw, 215px\" \/><\/figure>\n\n\n\n<p><strong>Step 2<\/strong><\/p>\n\n\n\n<p>To create a key definition, go to the <strong>Key Definition<\/strong> tab and press the plus button. In the <strong>Business Name<\/strong> field, enter the business name for the key, in the <strong>Key<\/strong> <strong>Field<\/strong> field, from the available elements select the <strong>Date <\/strong>object. Use the <strong>Verify <\/strong>function in the upper right corner and then save the key ( <strong>Save button)<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"450\" height=\"269\" src=\"https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2021\/01\/image-8.png\" alt=\"\" class=\"wp-image-722\" srcset=\"https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2021\/01\/image-8.png 450w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2021\/01\/image-8-300x179.png 300w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2021\/01\/image-8-16x10.png 16w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2021\/01\/image-8-335x200.png 335w\" sizes=\"(max-width: 450px) 100vw, 450px\" \/><\/figure>\n\n\n\n<p><strong>Step 3<\/strong><\/p>\n\n\n\n<p>In order for the created Time Dimension to be available during data analysis, it should be added as an association for transactional data. To do this, go to the edit screen for Business Entity that holds the transactional data (information on how to create <strong>Analytical Dataset<\/strong> (informacje, jak utworzy\u0107 tak\u0105 jednostk\u0119, znajduj\u0105 si\u0119 <a href=\"https:\/\/ad-astra.com.pl\/en\/2020\/12\/24\/warstwa-biznesowa-w-data-warehouse-cloud-czesc-2\/\" target=\"_blank\" rel=\"noreferrer noopener\">HERE<\/a>), i w zak\u0142adce <strong>Associations <\/strong>tab click on the plus button.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"495\" height=\"118\" src=\"https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2021\/01\/image-9.png\" alt=\"\" class=\"wp-image-723\" srcset=\"https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2021\/01\/image-9.png 495w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2021\/01\/image-9-300x72.png 300w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2021\/01\/image-9-16x4.png 16w\" sizes=\"(max-width: 495px) 100vw, 495px\" \/><\/figure>\n\n\n\n<p>For the <strong>Target Business Entity<\/strong> field select the created time dimension, then in the <strong>Foreign Key Field <\/strong>select the Date object. Save the association.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"247\" height=\"125\" src=\"https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2021\/01\/image-10.png\" alt=\"\" class=\"wp-image-724\" srcset=\"https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2021\/01\/image-10.png 247w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2021\/01\/image-10-16x8.png 16w\" sizes=\"(max-width: 247px) 100vw, 247px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"481\" height=\"211\" src=\"https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2021\/01\/image-11.png\" alt=\"\" class=\"wp-image-725\" srcset=\"https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2021\/01\/image-11.png 481w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2021\/01\/image-11-300x132.png 300w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2021\/01\/image-11-16x7.png 16w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2021\/01\/image-11-456x200.png 456w\" sizes=\"(max-width: 481px) 100vw, 481px\" \/><\/figure>\n\n\n\n<p>Although we are not using it in this example, it is worth mentioning that the <strong>Association<\/strong> <strong>Context<\/strong> option allows you to name an association. This is useful when we have different kind of dates in the transaction data (e.g. shipment date, delivery date, etc.) and we create several links (associations) for them to the same time dimension.<\/p>\n\n\n\n<p>Now going to <strong>Data Preview<\/strong> , we can see that the Time Dimension and all its elements that we selected at the beginning are freely available during data analysis.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" src=\"https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2021\/01\/image-13-1024x419.png\" alt=\"\" class=\"wp-image-729\" width=\"899\" height=\"368\" srcset=\"https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2021\/01\/image-13-1024x419.png 1024w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2021\/01\/image-13-300x123.png 300w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2021\/01\/image-13-768x315.png 768w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2021\/01\/image-13-535x219.png 535w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2021\/01\/image-13-16x7.png 16w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2021\/01\/image-13-488x200.png 488w, https:\/\/ad-astra.com.pl\/wp-content\/uploads\/2021\/01\/image-13.png 1067w\" sizes=\"(max-width: 899px) 100vw, 899px\" \/><\/figure>","protected":false},"excerpt":{"rendered":"<p>As an addition to the previous articles on Business Layer in SAP Data Warehouse Cloud, we will also present how to quickly and easily add a time dimension to this layer using functionalities built in DWC. We will rely on data and objects created in previous publications (link to part one ...<\/p>","protected":false},"author":2,"featured_media":721,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[17,13],"tags":[34,50,10,43,51],"_links":{"self":[{"href":"https:\/\/ad-astra.com.pl\/en\/wp-json\/wp\/v2\/posts\/711"}],"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=711"}],"version-history":[{"count":9,"href":"https:\/\/ad-astra.com.pl\/en\/wp-json\/wp\/v2\/posts\/711\/revisions"}],"predecessor-version":[{"id":754,"href":"https:\/\/ad-astra.com.pl\/en\/wp-json\/wp\/v2\/posts\/711\/revisions\/754"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ad-astra.com.pl\/en\/wp-json\/wp\/v2\/media\/721"}],"wp:attachment":[{"href":"https:\/\/ad-astra.com.pl\/en\/wp-json\/wp\/v2\/media?parent=711"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ad-astra.com.pl\/en\/wp-json\/wp\/v2\/categories?post=711"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ad-astra.com.pl\/en\/wp-json\/wp\/v2\/tags?post=711"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}