简体   繁体   English

在Power BI中使用Postgresql存储function作为数据源

[英]Using Postgresql stored function as a data source in Power BI

I am trying to use a stored function I have written in Postgresql as a data source for a Power BI chart.我正在尝试使用我在 Postgresql 中编写的存储 function 作为 Power BI 图表的数据源。 The function accepts four parameters all of date type. function 接受四个参数,都是日期类型。 The function signature looks like this: function 签名如下所示:

get_revenue_metrics(signup_start_date, signup_end_date, revenue_start_date, revenue_end_date)

This function uses these dates in multiple where clauses to create and return a table.这个 function 在多个 where 子句中使用这些日期来创建和返回一个表。 I want to use that table to then build charts in my dashboard.我想使用该表在我的仪表板中构建图表。

I did come across this link which talks about using a SQL function in Power BI, but it is for Azure SQL Server and not Postgresql. From the very first step as mentioned in the link before, I do not see any option to我确实遇到了这个链接,它讨论了在 Power BI 中使用 SQL function,但它适用于 Azure SQL 服务器,而不是 Postgresql。从前面链接中提到的第一步开始,我没有看到任何选项

Select the sql function when you initially select your data sources. Select sql function 当你最初 select 你的数据源。

Is there something I am missing?有什么我想念的吗? Thanks for the help!谢谢您的帮助!

The "table picker" is pretty simplistic, and for some objects you'll have to start with a SQL query. “表选择器”非常简单,对于某些对象,您必须从 SQL 查询开始。 See PostgreSQL - Connect using advanced options请参阅PostgreSQL - 使用高级选项连接

I found this video that walks you through the entire process.我找到了这个视频,它可以引导您完成整个过程。 I am very new to power BI so it was intimidating at first but this video was pretty straight forward and easy to understand.我是 Power BI 的新手,所以一开始它很吓人,但这个视频非常简单易懂。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM