It’s very easy to query SQL table-valued function to retrieve the result with Dataflows.
This is how we do this.

Let’s connect to a database. It will work via gateway as well.

Select your function.

Pass the parameter if required.

Now you can use this table to merge with other tables or map and load to Dataverse.

Super easy!
Continue Reading Olena Grischenko’s Article on their blog
https://msolenacrm.blog/2021/02/02/dataflows-for-power-apps-calling-a-table-valued-function-sql-function-with-power-query/
Blog Syndicated with Olena Grischenko’s Permission
More About This Author
Array
YouTube2021.03.03COATBRIDGE Olena and Andrew Grischenko Go Beyond Limits with Power Platform – YouTube
#PowerAutomate2021.02.08Dynamics 365 Sales Pro Trial Setup
#PowerAutomate2021.02.02Getting data from a function in an on-prem SQL server via Gateway in Power Automate
#PowerAutomate2021.02.02Dataflows for Power Apps: calling a table-valued SQL function with Power Query