{"id":7108,"date":"2014-03-03T00:00:57","date_gmt":"2014-03-03T00:00:57","guid":{"rendered":"http:\/\/craftydba.com\/?p=7108"},"modified":"2016-04-19T20:30:35","modified_gmt":"2016-04-19T20:30:35","slug":"power-query-part-2","status":"publish","type":"post","link":"https:\/\/craftydba.com\/?p=7108","title":{"rendered":"Power Query &#8211; Part 2"},"content":{"rendered":"<p>In recent months, there has been a big push for self service business intelligence tools by Microsoft.  The center of this universe is Microsoft Excel which is a common application used by the data analyst.  <\/p>\n<p>Today, I will continue talking about Power Query which is a self service ETL tool. This tool was <a href=\"http:\/\/blogs.msdn.com\/b\/powerbi\/archive\/2013\/08\/29\/try-the-latest-power-query-update.aspx\">released <\/a>in August of 2013. In addition to my blog, the <a href=\"http:\/\/office.microsoft.com\/en-us\/excel-help\/microsoft-power-query-for-excel-help-HA104003813.aspx\">online help<\/a> is a good place to start learning about this tool.<\/p>\n<p>Last time, I showed you how to find an online data source, extract the data, perform some simple translations and load the data into MS Excel.  <\/p>\n<p>Now I am going to perform a high level review of all the different import options that are available.  Power Query is very flexible given the larger number of import options available to the end user.<\/p>\n<p>The &#8220;get external data&#8221; and &#8220;excel data&#8221; sections of the ribbon is where we will concentrate.<\/p>\n<p><a href=\"https:\/\/craftydba.com\/wp-content\/uploads\/2014\/03\/B01-power-query-get-external-data.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/craftydba.com\/wp-content\/uploads\/2014\/03\/B01-power-query-get-external-data.jpg\" alt=\"B01-power-query-get-external-data\" width=\"330\" height=\"119\" class=\"aligncenter size-full wp-image-7118\" srcset=\"https:\/\/craftydba.com\/wp-content\/uploads\/2014\/03\/B01-power-query-get-external-data.jpg 330w, https:\/\/craftydba.com\/wp-content\/uploads\/2014\/03\/B01-power-query-get-external-data-300x108.jpg 300w\" sizes=\"auto, (max-width: 330px) 100vw, 330px\" \/><\/a><\/p>\n<p>The &#8220;online search&#8221; and &#8220;from web&#8221; ribbon buttons go hand in hand.  The search was used last time to identify a public web data source for loading.  However, it we knew the web URL, we could have used the second option.<\/p>\n<p><a href=\"https:\/\/craftydba.com\/wp-content\/uploads\/2014\/03\/B02-power-query-get-data-from-web.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/craftydba.com\/wp-content\/uploads\/2014\/03\/B02-power-query-get-data-from-web.jpg\" alt=\"B02-power-query-get-data-from-web\" width=\"702\" height=\"346\" class=\"aligncenter size-full wp-image-7120\" srcset=\"https:\/\/craftydba.com\/wp-content\/uploads\/2014\/03\/B02-power-query-get-data-from-web.jpg 702w, https:\/\/craftydba.com\/wp-content\/uploads\/2014\/03\/B02-power-query-get-data-from-web-300x147.jpg 300w\" sizes=\"auto, (max-width: 702px) 100vw, 702px\" \/><\/a><\/p>\n<p>It is amazing that many companies still use flat files to exchange data.  The &#8220;from file&#8221; ribbon button allows you to import the following data files: Excel, Comma Separated Values (CSV), Extensible Markup Language (XML), Text File, and From Folder.<\/p>\n<p><a href=\"https:\/\/craftydba.com\/wp-content\/uploads\/2014\/03\/B03-power-query-get-data-from-file.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/craftydba.com\/wp-content\/uploads\/2014\/03\/B03-power-query-get-data-from-file.jpg\" alt=\"B03-power-query-get-data-from-file\" width=\"319\" height=\"392\" class=\"aligncenter size-full wp-image-7122\" srcset=\"https:\/\/craftydba.com\/wp-content\/uploads\/2014\/03\/B03-power-query-get-data-from-file.jpg 319w, https:\/\/craftydba.com\/wp-content\/uploads\/2014\/03\/B03-power-query-get-data-from-file-244x300.jpg 244w\" sizes=\"auto, (max-width: 319px) 100vw, 319px\" \/><\/a><\/p>\n<p>Larger and more mature companies store their data in a relational database.  That is why the &#8220;from database&#8221; ribbon button supports the following databases:  SQL Server, Azure SQL, MS Access, Oracle, IBM DB2, MySQL, PostgreSQL, Sybase and Teradata.  These import options cover the majority of relational databases used day-to-day.<\/p>\n<p><a href=\"https:\/\/craftydba.com\/wp-content\/uploads\/2014\/03\/B04-power-query-get-data-from-database.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/craftydba.com\/wp-content\/uploads\/2014\/03\/B04-power-query-get-data-from-database.jpg\" alt=\"B04-power-query-get-data-from-database\" width=\"406\" height=\"598\" class=\"aligncenter size-full wp-image-7126\" srcset=\"https:\/\/craftydba.com\/wp-content\/uploads\/2014\/03\/B04-power-query-get-data-from-database.jpg 406w, https:\/\/craftydba.com\/wp-content\/uploads\/2014\/03\/B04-power-query-get-data-from-database-203x300.jpg 203w\" sizes=\"auto, (max-width: 406px) 100vw, 406px\" \/><\/a><\/p>\n<p><a href=\"http:\/\/www.pcmag.com\/article2\/0,2817,2361500,00.asp\">Cloud based providers<\/a> and on-line <a href=\"http:\/\/webseo22.hubpages.com\/hub\/How-Social-Media-Has-Changed-the-World-Impact-of-Social-Media-on-Our-Lives\">social media<\/a> are having an impact on our lives and how we do business.  The &#8220;from other sources&#8221; ribbon button allows the BI technologist to access these data sources.  <\/p>\n<p>The following data sources can be imported:  SharePoint List, OData Feed, Azure Marketplace, Hadoop File, Azure HDInsight, Azure Blob Storage, Azure Table Storage, Active Directory, MS Exchange, and Facebook.<\/p>\n<p><a href=\"https:\/\/craftydba.com\/wp-content\/uploads\/2014\/03\/B05-power-query-get-data-from-other-sources.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/craftydba.com\/wp-content\/uploads\/2014\/03\/B05-power-query-get-data-from-other-sources.jpg\" alt=\"B05-power-query-get-data-from-other-sources\" width=\"466\" height=\"714\" class=\"aligncenter size-full wp-image-7129\" srcset=\"https:\/\/craftydba.com\/wp-content\/uploads\/2014\/03\/B05-power-query-get-data-from-other-sources.jpg 466w, https:\/\/craftydba.com\/wp-content\/uploads\/2014\/03\/B05-power-query-get-data-from-other-sources-195x300.jpg 195w\" sizes=\"auto, (max-width: 466px) 100vw, 466px\" \/><\/a><\/p>\n<p>In short, I can see many future articles exploring all these continually growing data source types.<\/p>\n<p>Last but not least, there maybe times in which you have internal data that you want to add your data analysis.  For instance, a part number to part name translation from a vendor that does not supply this information in a electronic format.  How do you get this information into the data model? <\/p>\n<p>Do not sweat!  The &#8220;from table&#8221; ribbon button under the &#8220;excel data&#8221; section allows you to import any range of data from an existing worksheet into your model.  Just supply the cell range for your table and whether or not the table has headers.<\/p>\n<p><a href=\"https:\/\/craftydba.com\/wp-content\/uploads\/2014\/03\/B06-power-query-get-data-from-table.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/craftydba.com\/wp-content\/uploads\/2014\/03\/B06-power-query-get-data-from-table.jpg\" alt=\"B06-power-query-get-data-from-table\" width=\"462\" height=\"353\" class=\"aligncenter size-full wp-image-7132\" srcset=\"https:\/\/craftydba.com\/wp-content\/uploads\/2014\/03\/B06-power-query-get-data-from-table.jpg 462w, https:\/\/craftydba.com\/wp-content\/uploads\/2014\/03\/B06-power-query-get-data-from-table-300x229.jpg 300w\" sizes=\"auto, (max-width: 462px) 100vw, 462px\" \/><\/a><\/p>\n<p>To recap, the Power Query tool allows a BI technologist to import data &#8220;from web&#8221;, &#8220;from files&#8221;, &#8220;from database&#8221;, &#8220;from other sources&#8221; and &#8220;from tables&#8221; &#8212; hand crafted MS excel workbooks.  It is a very flexible tool to import (extract from source) your data into excel for analysis.<\/p>\n<p>Next time, I will be talking about the Query Editor.  This is where custom transformations are applied to the raw data to mold it into a form that you want.  <\/p>\n","protected":false},"excerpt":{"rendered":"<p>In recent months, there has been a big push for self service business intelligence tools by Microsoft. The center of this universe is Microsoft Excel which is a common application used by the data analyst. Today, I will continue talking about Power Query which is a self service ETL tool. This tool was released in August of 2013. In addition to my blog, the online help is a good place to start learning about this tool. Last time, I showed you how to find an online data source, extract the&hellip;<\/p>\n","protected":false},"author":1,"featured_media":7070,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1042],"tags":[1049,1052,1051,1053,1054,1050,1048,15,1043,1045],"class_list":["post-7108","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-power-query","tag-excel-data","tag-from-database","tag-from-file","tag-from-other-sources","tag-from-table","tag-from-web","tag-get-external-data","tag-john-f-miner-iii","tag-power-query","tag-self-service-etl"],"_links":{"self":[{"href":"https:\/\/craftydba.com\/index.php?rest_route=\/wp\/v2\/posts\/7108","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/craftydba.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/craftydba.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/craftydba.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/craftydba.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=7108"}],"version-history":[{"count":0,"href":"https:\/\/craftydba.com\/index.php?rest_route=\/wp\/v2\/posts\/7108\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/craftydba.com\/index.php?rest_route=\/wp\/v2\/media\/7070"}],"wp:attachment":[{"href":"https:\/\/craftydba.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=7108"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/craftydba.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=7108"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/craftydba.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=7108"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}