Saturday, January 27, 2024

Power BI Desktop Report Connecting to Snowflake Database

 

Requirement

    Develop the power bi report using Snowflake as source of data.

Tools needed

  • Snowflake account.
  • Power BI Desktop        

Explore Data in Snowflake

    Let's connect to Snowflake account in web, Below screenshot is the interface of the Snowflake


    








Go to the Data section highlighted above.
We can use the sample data provided by Snowflake.

You can navigate from Data tab to see the sample data as shown below-
Data -> Databases -> SNOWFLAKE_SAMPLE_DATA ->  TPCH_SF1 ->  Tables






























We can use above tables to do reporting on PowerBI

Connect Snowflake In PowerBI

Open the PowerBI desktop and select Get Data, it will open below like screen. Select Snowflake from the list of different databases and click Connect.
























After clicking on Connect, it will ask for the server details and warehouse.













Enter the details like 
Server -  <your_account_identifier>.snowflakecomputing.com
e.g. my server - fzjlcwk-ns72307.snowflakecomputing.com

Warehouse - You can create your own warehouse as shown below screenshot.
Basically, warehouse is the cluster which helps to run the code or in data load.

















My details for connecting Snowflake database is shown below-
After connected to the source, all the databases having access I can see in the Navigator.





















Select the required tables to add into the PowerBI model and click Load.




























After Load, you need to select its Import or DirectQuery, we will select Import for now.




















It will start loading the data.
























All the tables were loaded and can see in the PowerBI Data pane.



















Go to the Model and establish the relationship between the tables as if we don't do that then the data will not be related and show wrong (it apply cross join).

After establishing the correct relationship, we can see the model like below-




















Go to Report view and use the fields to create the report


We successfully created the PowerBI report using Snowflake database,




No comments:

Post a Comment

Python Tricks Part-1

Python - Tricks - Part-1 Printing Horizontally  Default it will print one after another list1 = [ 1 , 3 , 6 , 7 ] for number in list1: ...