SQL Server – jack of all trades master of some http://jackofalltradesmasterofsome.com/blog Consultant - Real Estate - Author - Business Intelligence Tue, 12 Jan 2021 14:54:33 +0000 en-US hourly 1 https://wordpress.org/?v=6.5.5 Setting up Azure Data Factory Integration Runtime for On-Prem Connections http://jackofalltradesmasterofsome.com/blog/2021/01/12/setting-up-azure-data-factory-integration-runtime-for-on-prem-connections/ Tue, 12 Jan 2021 14:34:40 +0000 http://jackofalltradesmasterofsome.com/blog/?p=986 If you need to connect your Azure Data Factory to an on-premise SQL server you will need help Setting up Azure Data Factory Integration Runtime for On-Prem Connections

Set up On-Prem Integration Run Time

  1. Click on Author & Monitor from Azure Data Factory
  • Create two new linked services
    • Linked Service to Database. Since we are using a local on-prem SQL server we will need to create a integrated run time. Click on Manage -> Integrated Runtimes -> New
  • Select Integration runtime setup followed by Self-Hosted.
  • Name the Runtime Setup and select “Next”
  • On the next step, Option 2: Manual Setup and download and install the integration runtime. Or download from here.
  • Download and install the runtime. The IR should be on the same machine that your data is located.
  • One the installation is done you will be prompted with the Configuration Manager (Self-Hosted). Enter the keys from your Azure Setup and hit register.
  • Leave the name as is and check the box to “Enable Remote Access from Intranet” if you need it, but it is not necessary.
  • If all is setup correctly you will get a confirmation message.
  1. If you navigate back to your Azure environment, you will now see your new integrated self-hosted run time available.

Connecting to On-Prem SQL Server

  1. From Azure Data Factory, Select Linked Services -> New, and you will now see an option for a SQL Server.
  • Give the connection a name and fill in the rest of the details to line up to your local SQL Server and set to the new integrated run time. If you have not created a SQL Authentication ID before, see the steps at the bottom of this tutorial for details.
  • Be sure to test the connection and hit create once completed.

Setting up Security on Local Database for Integration Runtime

You will need to create a SQL Authenticated User or service account for the connection to this database by Azure Data Factory.

  1. Connect to your database and select Security -> New -> Login
  • Create a new Login name, set to SQL Server Authenticaion, set a password and on the User Mappings Roles, Grant Access to AdventureWorksDB as Owner.

Setting up Azure Data Factory Integration Runtime for On-Prem Connections

]]>
Direct Custom SQL Query Denodo from Power BI M Query http://jackofalltradesmasterofsome.com/blog/2020/07/30/direct-quer-denodo-from-power-bi-m-query/ Thu, 30 Jul 2020 19:54:55 +0000 http://jackofalltradesmasterofsome.com/blog/?p=891 If you are planning to use Power BI on top of Denodo sometimes a base view or a Power Query won’t be enough. If you need to embed your own complex query to pull data from Denodo, there are a few items you must be aware of. See below on how to Direct Custom SQL Query Denodo from Power BI M Query.

1. Create a Data Connection to Denodo

2. Connect Power BI to Denodo using the ODBC Connections

3. Select Transform and Create a blank query in Power BI

  • In the Advanced Editor, Place in your query which you can copy from below as a starter template
    1. All table names are case sensitive. The source queries were not and the developers may have missed some
    2. All table and column names need 2 double quotes on each side
    3. Basic SQL functions like Left or ConCat may give you issues. Be sure to read the documentation on other ways to emulate this functions.

Sample Query

let
    Source = Odbc.Query(“dsn=Denodo_ServerName”, “SELECT Sum(“”Amount””) AS Amount
            ,””Column1″”
            ,”” Column2″”
      FROM “”vw_Viewname””
      WHERE “” Column3″” = 0
            AND “” Column4″” = 0
      GROUP BY “” Column1 “”
            ,”” Column2 “””) 
in
    Source

Direct Custom SQL Query Denodo from Power BI M Query

]]>
Visual Studio Dev Essentials to download and install SQL Server Developer Edition http://jackofalltradesmasterofsome.com/blog/2019/03/28/visual-studio-dev-essentials-to-download-and-install-sql-server-developer-edition/ Thu, 28 Mar 2019 18:38:57 +0000 http://jackofalltradesmasterofsome.com/blog/?p=364 With the Microsoft BizSpark program now gone, so is the easy way to download and install SQL Server to your local machine for development purposes. Let’s take a look at using Visual Studio Dev Essentials to download and install SQL Server Developer Edition on your local machine for data development.

  1. Join Visual Studio Dev Essentials and navigate to the portal
    1. https://visualstudio.microsoft.com/dev-essentials/
  • Head over to the download section and select a version of SQL Server
  • Download and Install! There should not be a key required. Remember, this is a local developer license and not to be used on a production instance.
]]>