Forum Discussion
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.
| Sr | Query |
| 1 | Select .... |
| 2 | Select .... |
| 3 | Select .... |
| 4 | Select .... |
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.
- Anonymous2 years ago
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.
Table.SelectRows - PowerQuery M | Microsoft Learn
Regards,
Xiaoxin Sheng
2 Replies
- lbendlin
Super User
Do that in a view in your database, or use Incremental Refresh if your query partitions support that.
- AnonymousNot 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.
Table.SelectRows - PowerQuery M | Microsoft Learn
Regards,
Xiaoxin Sheng