slack gitlab_如何将Power BI数据警报集成到Slack
slack gitlabThere is a growing trend among professionals and entire companies to move away from email as a primary means of communication and are even adopting alternative technologies. One of the...
slack gitlab
There is a growing trend among professionals and entire companies to move away from email as a primary means of communication and are even adopting alternative technologies. One of the most popular of these is Slack. Slack is a new kind of messaging and communication platform between colleagues, team or community members that allows them to integrate a lot of services including Visual Studio Team Service, Jira and GitHub.
在专业人士和整个公司中,越来越多的趋势不再使用电子邮件作为主要的通信手段,甚至正在采用替代技术。 其中最流行的一种是Slack 。 Slack是同事,团队或社区成员之间的一种新型消息传递和交流平台,允许他们集成许多服务,包括Visual Studio Team Service,Jira和GitHub。
How then can we integrate Power BI data alerts to Slack? In this article we’ll answer this question and create a demonstration to show how.
然后我们如何将Power BI数据警报集成到Slack? 在本文中,我们将回答这个问题并创建演示以演示如何进行。
The below image illustrates architecture of Power BI data alerts and Slack integration demonstration. In short; we will connect Power BI to SQL Azure and when the data alert is created by Power BI Microsoft Flow, send this alert to Slack Chanel.
下图说明了Power BI数据警报和Slack集成演示的体系结构。 简而言之; 我们将Power BI连接到SQL Azure,并在Power BI Microsoft Flow创建数据警报时,将该警报发送到Slack Chanel。
In this section, we can mention Microsoft Flow. Microsoft Flow is a cloud-based workflow tool which allows us to automate business processes. Particularly, Microsoft Flow offers to integrate and automate processes and tasks between different services. We will use this advanced integration feature of Microsoft Flow for communicating between Power BI and Slack.
在本节中,我们可以提及Microsoft Flow。 Microsoft Flow是基于云的工作流工具,它使我们能够自动化业务流程。 特别是,Microsoft Flow提供了在不同服务之间集成和自动化流程和任务的功能。 我们将使用Microsoft Flow的此高级集成功能在Power BI和Slack之间进行通信。
示范 (Demonstration)
In this demonstration, we will complete the following steps.
在此演示中,我们将完成以下步骤。
- Create AdventureworksLT sample database in Azure SQL (Platform as a Service) 在Azure SQL(平台即服务)中创建AdventureworksLT示例数据库
- Create a simple report with Power BI and publish this report to Power BI Portal 使用Power BI创建一个简单的报告,并将该报告发布到Power BI Portal
- Create Power BI data alert 创建Power BI数据警报
- Integrate Power BI data alert notification and Slack with Microsoft Flow 将Power BI数据警报通知和Slack与Microsoft Flow集成
在Azure SQL中创建AdventureworksLT示例数据库 (Create AdventureworksLT sample database in Azure SQL)
We will create an Azure SQL sample database whose named AdventureworksLT (AdventureWorks Light) and get data from this database to Power BI. We don t need any extra operations to install AdventureworksLT sample database in Azure SQL. When we want to create a SQL database on Azure Portal, it offers the option to create AdventureworksLT by default. You can find details of database creation steps in the article Microsoft Azure SQL Database – Step by Step Creation tutorial by Venkatesan Jayakantham. We’ll skip the details.
我们将创建一个名为AdventureworksLT (AdventureWorks Light)的Azure SQL示例数据库,并将数据从该数据库获取到Power BI。 我们不需要任何额外的操作即可在Azure SQL中安装AdventureworksLT示例数据库。 当我们要在Azure Portal上创建SQL数据库时,它提供了默认情况下创建AdventureworksLT的选项。 您可以在Venkatesan Jayakantham撰写的文章Microsoft Azure SQL数据库-逐步创建教程中找到数据库创建步骤的详细信息。 我们将跳过详细信息。
使用Power BI创建一个简单的报告,并将该报告发布到Power BI Portal (Create a simple report with Power BI and publish this report to Power BI Portal)
In this step; we will create a basic Power BI report and publish it to Power BI portal.
在这一步; 我们将创建基本的Power BI报告并将其发布到Power BI门户。
Open Power BI Desktop edition, click Get Data and then select More… option
打开Power BI Desktop版本,单击“ 获取数据” ,然后选择“ 更多…”选项
Find Azure SQL database and click Connect
查找Azure SQL数据库并单击连接
Fill the server and database name and paste the following query to SQL Statement box. This query will return some details about AdventureworkLT orders.
填写服务器和数据库名称,然后将以下查询粘贴到“ SQL语句”框中。 该查询将返回有关AdventureworkLT订单的一些详细信息。
select
Product.Name , VCat.ProductCategoryName,VCat.ParentProductCategoryName,SaleDet.LineTotal from SalesLT.SalesOrderDetail SaleDet
INNER JOIN SalesLT.Product Product
ON SaleDet.ProductID = Product.ProductID
INNER JOIN SalesLT.vGetAllCategories VCat
ON VCat.ProductCategoryID=Product.ProductCategoryID
Select DirectQuery and click OK button
选择DirectQuery并单击“确定”按钮
Chose Database tab and then fill the proper User Name and Password
选择数据库选项卡,然后填写正确的用户名和密码
Tip: If your IP address does not have permission to access Azure SQL you will get this error message.
提示:如果您的IP地址没有访问Azure SQL的权限,则会收到此错误消息。
If you experience this issue, you have to give access permission to your IP address. We can configure this permission in Azure Portal or with sp_set_database_firewall_rule procedure. Minette Steynberg has an awesome article details about this configuration shown here Configuring the Azure SQL Database Firewall
如果遇到此问题,则必须授予对IP地址的访问权限。 我们可以在Azure Portal中或使用sp_set_database_firewall_rule过程配置此权限。 Minette Steynberg在此处显示了有关此配置的出色文章详细信息,在此处配置Azure SQL数据库防火墙
After these steps, a little part of dataset will show in the screen.
In this step, we will add a card visual which illustrates the total value of LineTotal column.
在此步骤中,我们将添加一个卡片图形,以说明LineTotal列的总值。
Drag and drop LineTotal column to card visual field.
将LineTotal列拖放到卡片视域。
Click the Publish button and publish the report to Power BI Portal.
单击“ 发布”按钮,然后将报告发布到Power BI Portal。
You will get the following alert.
您将收到以下警报。
Tip: This alert defines that data source username and password does not send it to Power BI portal. Because of this reason, we have to manually re-enter this dataset credentials in Power BI portal.
提示:此警报定义数据源用户名和密码不会将其发送到Power BI门户。 因此,我们必须在Power BI门户中手动重新输入此数据集凭据。
Login Power BI Portal, find published dataset under the workspace and then click Settings of dataset.
登录Power BI门户,在工作空间下找到已发布的数据集,然后单击“数据集设置 ”。
Click Edit credentials and select Basic Authentication Method. Fill the User Name and Password text box.
单击编辑凭据,然后选择基本身份验证方法。 填写用户名和密码文本框。
In this step, we will set Schedule cache refresh option. This option lets us refresh data set identified time frequency. Refresh history option shows us the log of data refresh tasks.
在此步骤中,我们将设置“计划缓存刷新”选项。 此选项使我们可以刷新数据集标识的时间频率。 刷新历史记录选项向我们显示了数据刷新任务的日志。
Open the report and click the pin visual option and send it to Power BI card visual to a dashboard. This setting allows us to create data alert in dashboard.
打开报告,然后单击“固定视觉”选项,然后将其发送到Power BI card visual到仪表板。 此设置使我们可以在仪表板中创建数据警报。
Click Go to dashboard.
单击转到仪表板 。
创建Power BI数据警报 (Create Power BI data alert)
All the steps which we completed until here were for creation Power BI dataset and Power BI dashboard. In the next sections, we will create a data alert and send this alert to Slack. Power BI Data Alert is a notification mechanism that sends information messages when the data values exceed the limits. We can create data alerts only for card, KPI and gauge visuals.
到目前为止,我们完成的所有步骤都是用于创建Power BI数据集和Power BI仪表板的。 在接下来的部分中,我们将创建一个数据警报并将其发送给Slack。 Power BI数据警报是一种通知机制,可在数据值超出限制时发送信息消息。 我们只能为卡片,KPI和仪表视觉创建数据警报。
Click there point (…) of card visual in dashboard and select Manage alerts
单击仪表板中视觉图形的此处点(…),然后选择管理警报
Click Add alert rule and add a new alert. This is very basic screen; we can set it when notification is triggered. In the below demonstration; we will create a data alert that notifies us once an hour if the LineTotal value reaches down to 650 K (650.000). When you check “Send me email too” option you will get an e-mail about this notification.
单击添加警报规则,然后添加新警报。 这是非常基本的屏幕; 我们可以在触发通知时进行设置。 在下面的演示中; 如果LineTotal值降至650 K(650.000),我们将创建一个数据警报,每小时通知一次。 当您选中“也向我发送电子邮件”选项时,您将收到有关此通知的电子邮件。
When you check Send me email to option you will get an e-mail about this notification. This e-mail notification message will look like this.
选中向我发送电子邮件至选项时,您将收到有关此通知的电子邮件。 此电子邮件通知消息将如下所示。
You will see a new message alert in the notification tab of Power BI Portal. It means that a notification is fired and a new message is notified. When you click this message icon new notification or notifications will be shown.
您将在Power BI Portal的通知选项卡中看到新的消息警报。 这意味着将触发通知并通知新消息。 单击此消息图标时,将显示一个或多个新通知。
将Power BI数据警报通知和Slack与Microsoft Flow集成 (Integrate Power BI data alert notification and Slack with Microsoft Flow)
In the next steps of this demonstration; we will log into Microsoft Flow and then connect Power BI notification to Slack. We will find Alert your team when a Power BI data alert is triggered template in Microsoft Flow.
在本演示的后续步骤中; 我们将登录到Microsoft Flow,然后将Power BI通知连接到Slack。 当在Microsoft Flow中触发Power BI数据警报模板时,我们将发现“警报您的团队”。
We will set the Slack and Power BI account credentials and click continue.
我们将设置Slack和Power BI帐户凭据,然后单击继续。
In this screen, we will select the name of data alert which we want to notify Slack channel.
在此屏幕中,我们将选择要通知Slack频道的数据警报的名称。
Finally, Power BI alert sends it to Slack app. The below image was taken from a mobile app of Slack.
最后,Power BI警报将其发送到Slack应用。 下图取自Slack的移动应用程序。
As a result, we demonstrated Power BI and Slack integration by aid of Microsoft Flow.
结果,我们借助Microsoft Flow演示了Power BI和Slack的集成。
翻译自: https://www.sqlshack.com/how-to-integrate-power-bi-data-alerts-into-slack/
slack gitlab
开放原子开发者工作坊旨在鼓励更多人参与开源活动,与志同道合的开发者们相互交流开发经验、分享开发心得、获取前沿技术趋势。工作坊有多种形式的开发者活动,如meetup、训练营等,主打技术交流,干货满满,真诚地邀请各位开发者共同参与!
更多推荐
所有评论(0)