{"id":996,"date":"2021-06-26T12:11:43","date_gmt":"2021-06-26T10:11:43","guid":{"rendered":"https:\/\/www.flip-design.de\/?p=996"},"modified":"2021-06-26T12:11:43","modified_gmt":"2021-06-26T10:11:43","slug":"process-sql-analysis-services-cubes-via-the-azure-data-factory","status":"publish","type":"post","link":"https:\/\/www.flip-design.de\/?p=996","title":{"rendered":"Process SQL Analysis Services Cubes via the Azure Data Factory"},"content":{"rendered":"\n<p>If you work with Analysis Services on Azure, it is another way to process a cube. On premises you use mostly the SQL Server Agent to do this, but this option is not given on Azure. There you can use Azure Automation, PowerShell, or a Data Factory (ADF). This post is dedicated to the ADF, because mostly you need to process a table, partition, or the whole database after you made a data intake.<br><br>First we need to grant permissions to the SSAS Cube from the ADF. So, we need to create a managed identity. To get the needed data, open the properties of the ADF at the Azure Portal.<br><br>With the Tenant and the ADF ID, we can build the credential-<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/06\/image-4.png\"><img decoding=\"async\" loading=\"lazy\" width=\"605\" height=\"308\" src=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/06\/image-4.png\" alt=\"\" class=\"wp-image-997\" srcset=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/06\/image-4.png 605w, https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/06\/image-4-300x153.png 300w, https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/06\/image-4-500x255.png 500w\" sizes=\"(max-width: 605px) 100vw, 605px\" \/><\/a><\/figure>\n\n\n\n<p>Next, connect to the AS instance via the Management Studio and go the server administrators and add this user. Via the Azure portal it is not possible, but after that, you can view the result.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/06\/image-5.png\"><img decoding=\"async\" loading=\"lazy\" width=\"605\" height=\"421\" src=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/06\/image-5.png\" alt=\"\" class=\"wp-image-998\" srcset=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/06\/image-5.png 605w, https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/06\/image-5-300x209.png 300w, https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/06\/image-5-431x300.png 431w\" sizes=\"(max-width: 605px) 100vw, 605px\" \/><\/a><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/06\/image-6.png\"><img decoding=\"async\" loading=\"lazy\" width=\"605\" height=\"401\" src=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/06\/image-6.png\" alt=\"\" class=\"wp-image-999\" srcset=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/06\/image-6.png 605w, https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/06\/image-6-300x199.png 300w, https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/06\/image-6-453x300.png 453w\" sizes=\"(max-width: 605px) 100vw, 605px\" \/><\/a><\/figure>\n\n\n\n<p>To check the result, if a refresh has worked, I have added a View to my data source and imported the data inside the cube.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/06\/image-7.png\"><img decoding=\"async\" loading=\"lazy\" width=\"434\" height=\"171\" src=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/06\/image-7.png\" alt=\"\" class=\"wp-image-1000\" srcset=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/06\/image-7.png 434w, https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/06\/image-7-300x118.png 300w\" sizes=\"(max-width: 434px) 100vw, 434px\" \/><\/a><\/figure>\n\n\n\n<p>You should format the column as a date type and format the column as a G, so you also get the time inside the output.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/06\/image-8.png\"><img decoding=\"async\" loading=\"lazy\" width=\"362\" height=\"426\" src=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/06\/image-8.png\" alt=\"\" class=\"wp-image-1001\" srcset=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/06\/image-8.png 362w, https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/06\/image-8-255x300.png 255w\" sizes=\"(max-width: 362px) 100vw, 362px\" \/><\/a><\/figure>\n\n\n\n<p>Okay, the infrastructure is ready! Now, we can add a new pipeline inside our ADF with a web activity.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/06\/image-9.png\"><img decoding=\"async\" loading=\"lazy\" width=\"605\" height=\"308\" src=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/06\/image-9.png\" alt=\"\" class=\"wp-image-1002\" srcset=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/06\/image-9.png 605w, https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/06\/image-9-300x153.png 300w, https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/06\/image-9-500x255.png 500w\" sizes=\"(max-width: 605px) 100vw, 605px\" \/><\/a><\/figure>\n\n\n\n<figure class=\"wp-block-embed\"><div class=\"wp-block-embed__wrapper\">\nhttps:\/\/eastus.asazure.windows.net\/servers\/blog001\/models\/blog\/refreshes\n<\/div><\/figure>\n\n\n\n<p><strong>This is the schema: <a href=\"https:\/\/%3cregion%3e.asazure.windows.net\/servers\/%3cservername%3e\/models\/%3cmodelname%3e\/refreshes\">https:\/\/&lt;region>.asazure.windows.net\/servers\/&lt;servername>\/models\/&lt;modelname>\/refreshes<\/a><br><\/strong>For the fifth point add following URL for the authentication. <a href=\"https:\/\/*.asazure.windows.net\">https:\/\/*.asazure.windows.net<\/a><br><br>The following XMLA code will initiate a full process <br>{<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&#8222;Type&#8220;: &#8222;Full&#8220;,<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&#8222;CommitMode&#8220;: &#8222;transactional&#8220;,<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&#8222;MaxParallelism&#8220;: 2,<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&#8222;RetryCount&#8220;: 2,<\/p>\n\n\n\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&#8222;Objects&#8220;: []<\/p>\n\n\n\n<p>}<br><strong>After running the ADF pipeline you should get a full refresh of the cube:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/06\/image-10.png\"><img decoding=\"async\" loading=\"lazy\" width=\"605\" height=\"165\" src=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/06\/image-10.png\" alt=\"\" class=\"wp-image-1003\" srcset=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/06\/image-10.png 605w, https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/06\/image-10-300x82.png 300w, https:\/\/www.flip-design.de\/wp-content\/uploads\/2021\/06\/image-10-500x136.png 500w\" sizes=\"(max-width: 605px) 100vw, 605px\" \/><\/a><\/figure>\n\n\n\n<p><strong><br><br><\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you work with Analysis Services on Azure, it is another way to process a cube. On premises you use mostly the SQL Server Agent to do this, but this option is not given on Azure. There you can use &hellip; <a href=\"https:\/\/www.flip-design.de\/?p=996\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0},"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/www.flip-design.de\/index.php?rest_route=\/wp\/v2\/posts\/996"}],"collection":[{"href":"https:\/\/www.flip-design.de\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.flip-design.de\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.flip-design.de\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.flip-design.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=996"}],"version-history":[{"count":1,"href":"https:\/\/www.flip-design.de\/index.php?rest_route=\/wp\/v2\/posts\/996\/revisions"}],"predecessor-version":[{"id":1004,"href":"https:\/\/www.flip-design.de\/index.php?rest_route=\/wp\/v2\/posts\/996\/revisions\/1004"}],"wp:attachment":[{"href":"https:\/\/www.flip-design.de\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=996"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.flip-design.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=996"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.flip-design.de\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=996"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}