Output to Power BI
In this tutorial, you will learn how to use Canner Enterprise to output data to Power BI for report application.
Before starting this tutorial, you will need to have completed Connecting Data Sources in Canner Enterprise and Import data in your Workspace.
Integration Method
Canner Enterprise currently supports two ways to integrate with Power BI, the first is Push Dataset, and the second is PostgreSQL Wire Protocol.
The biggest difference between PostgreSQL Wire Protocol
and Push Dataset
is that
PostgreSQL Wire Protocol
can directly execute SQL Query to access all Table/ View/ Materialized View in WorkspacePush Dataset
is pushing data into Power BI. When Refresh Data, it is automatically completed by Canner Enterprise. Once the data is updated, the system will push the data to Power BI Service and rebound to the report. The report will see the latest information.
Push Dataset restrictions are as follows:
- A dataset can have up to 75 fields
- A dataset can hold a maximum of 1,000,000 data
Push Dataset
Different from the Data Warehouse / Database through Connector, we allow users to integrate various heterogeneous data sources first, create a Materialized View for the calculated data, and automatically convert it into ZIP format and push the data to Power BI In Service, Power BI users can directly access data.
PostgreSQL Wire Protocol
Canner Enterprise implements the interface of PostgreSQL Wire Protocol, and Power BI users can directly execute SQL Queries to read all the data in the Canner Enterprise workspace.
Usage scenarios
Push Dataset
Power BI often fails due to problems such as insufficient computing resources. If you have routine reports to generate to Power BI, you can use push dataset to offload data computation in Canner Enterprise.
PostgreSQL Wire Protocol
It is suitable for situations where many ad-hoc queries / direct queries are executed.
Setting up Push Dataset
Setting in Power BI Service
In the next few steps, you need to set the relevant permissions on the Power BI Service and obtain the required information to fill in Canner Enterprise later.
Step 1: Application Registration
- Application Registration > Create an application with the name
Canner Power BI Push Dataset App
.
- Click the created Canner Enterprise Power BI Push Dataset App > copy the "Application (Client) Identification Code (Application ID)" and "Directory (Tenant User) Identification Code (Tenant ID)", we will use in the next step.
·
3. Click Credentials and Secrets > Add a new client password in the Client Password
section.
- Copy the value of
Canner Power BI Push Dataset
secret (Application secret).
In this step, please be sure to copy the value of the secret key; you will not be able to copy the value if you look back later.
Step 2: Create Security Groups
- Go to Azure Active Directory > Groups, and click "Add Group"
Search for
Azure Active Directory
Click "Add Group" on this page
- When creating, enter the newly created application
Canner Power BI Push Dataset App
in "Members", and select "Security" for the group type
- After the creation is completed, the following picture is shown:
Step 3: Enable Power BI Service Admin Settings
- Next, in order to allow the service subject Canner Enterprise Power BI Push Dataset App to access the API of Power BI, we need to open the permission of the service subject to access the API in the Service of Power BI. The settings in this part can only set by Power BI The administrator permission of Azure (different from the administrator permission of Azure), if you want to open the administrator permission of Power BI, please refer to this document: https://docs.microsoft.com/zh-tw/power-bi/admin/service-admin-role
- By specifying a "specific security group", the access rights to the API can be limited to this security group. Then we can allow specific workspaces to be protected by adding this security group Power BI API access operations.
Step 4: Add the service principal to your Workspace
- Create a workspace that needs to be accessed through the Power BI API through "Create Workspace"> then click on the new Workspace and open the workspace access, as follows for "test-power-bi":
Workspace access and creation of Workspace requires Power BI Pro product permissions, which are different from Power BI administrator role permissions, as shown in the following figure from the confirmation of User > Authorization (License) in Azure AD:
You can set it here if you do not have Power BI Pro product permissions. In the Power BI service, go to the "Admin Portal" in the upper right corner > User > Go to [Microsoft 365 System Management Center](https://portal .office.com/AdminPortal/Home#/homepage)
And open Microsoft, click the active user, edit the user's authorization and App authorization, and activate Power BI Pro.
- Enter the security group created in Azure AD:
This belongs to the Workspace, because with this security group Canner Enterprise Power BI App, the Canner Enterprise Power BI Push Dataset App service principal (Service Principal) belonging to the security group can obtain the Power BI API Access permissions and can only be used in the Workspace where the group is added.
Canner Enterprise set Push Dataset
Step 1: Create Power BI Service Principal Credential
Click the gear icon in the upper right corner, expand the menu, and select Credentials
.
Once in, click the Create a Credential
button.
Enter the obtained
- Application ID (application (client) identification code obtained in the information after the application is successfully registered)
- Application Secret (obtained in the certificate and secret after the application is successfully registered)
- Tenant ID (directory (rental user) identification code (Tenant ID), after the application is registered successfully)
Step 2: Create Push Dataset
Click the switching menu in the upper left corner to enter the Power BI Push Dataset page.
Click Create
Create a Push Dataset
Then, a form will pop up; you need to fill in the following information
Credential Name
: SelectPower BI Service Principal Credential
created in the previous stepPower BI Workspace Name
: Select which Power BI workspace to push toMaterialized View
: Select the Materialized View you want to push to Power BIRebind Report
: Under normal circumstances, Please check this field; we will update the data set bound to the report simultaneously.
When selecting Power BI Workspace Name
, a window will pop up for the user to choose a workspace.
You may notice that when you add a group workspace (Group Workspace) in Power BI, it will not be visible on Canner Enterprise immediately because the Power BI RESTful API will not get the latest data, as shown in the figure below, when you created a workspace and authorized it to Canner Power BI App
according to the previous steps.
The list currently seen may be empty
It takes a while to take effect, and the waiting time may be around 20 - 40 minutes.
Step 3: Observe the status of Power BI Push Dataset
When the status changes to Synced
, it means that the data push is successful
Data are also available on the Power BI Service
How to set schedule update
When generating Materialized View, if you have selected [Schedule Update](/v2/product/workspaces/sql/materialized_view#Schedule Management Settings), each time it is automatically updated, or you are on the Materialized View page, click Refresh
When doing a manual update, Power BI Push Dataset will enter the Preparing
state, which means that the Materialized View is being updated, and the data is being prepared to be pushed to the Power BI Service.
Power BI Push Dataset has three states
- Preparing: Represents that the Materialized View is being updated
- Syncing: Indicates that data is being sent to Power BI Service
- Synced: Indicates that the data transmission has been completed
Setting up PostgreSQL Wire Protocol
Currently, only Import Mode is supported
1. In Get Data, select PostgreSQL Database
connection
2. Enter connection information
- Server: Enter IP/Host and Port
- Database: Enter the SQL Name of the Workspace
You can see the Workspace SQL Name in the workspace list
3. Enter user/password
Password input Personal Access Token
4. Load Data
After the connection is successful, a window will pop up to display all available Tables/ Views/ Materialized Views in the Workspace
5. Getting Started
Then, you can use the data in Canner Enterprise in Power BI