Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Executing list of sql queries stored in database table

Hello Everyone,

 

I'm looking for an apporach to load data into Power BI from list of SQL queries stored in Postgres database table.

 

SrQuery
1Select ....
2Select ....
3Select ....
4Select ....

 

Essentially, we need to automate query loading process as list of query will increase/decrease with time & manual addition would not be permanent solution.

 

Any inputs if this can be achived & appreciate if you can share your experiences.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous,

I think you can try to parameterized connection string to achieve two steps getting data operation.

At the first, you can getting data from the SQL table that stored the t-SQL query lists. The second, you can use query parameters to control and pick up specific row values to use them as conditons in a new query step with data connector to getting data.

Deep Dive into Query Parameters and Power BI Templates | Microsoft Power BI Blog | Microsoft Power BI

Table.SelectRows - PowerQuery M | Microsoft Learn

Regards,

Xiaoxin Sheng

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @Anonymous,

I think you can try to parameterized connection string to achieve two steps getting data operation.

At the first, you can getting data from the SQL table that stored the t-SQL query lists. The second, you can use query parameters to control and pick up specific row values to use them as conditons in a new query step with data connector to getting data.

Deep Dive into Query Parameters and Power BI Templates | Microsoft Power BI Blog | Microsoft Power BI

Table.SelectRows - PowerQuery M | Microsoft Learn

Regards,

Xiaoxin Sheng

lbendlin
Super User
Super User

Do that in a view in your database, or use Incremental Refresh if your query partitions support that.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.