Forum Discussion
Dataflow and PowerBI Gateway - Sourcing data dynamically
Hi miguel
As long as this functionality works with the on-premises data gateway, it sounds viable.
I will look into this option.
Thanks
Hi miguel , Element115 , v-cboorla-msft
I have built M code to produce the effect that I am trying to achieve as follows:
- miguel2 years agoCommunity Admin
I don't think that there's a need to use Sql.Database when you're already querying and gaining access to all databases from the server with Sql.Databases. You're introducing the issue of unbinded connections when you're using new data source functions to the mix - if you just leverage the tree view given by Sql.Databases you should be able to achieve the same without incurring into accessing new data sources (and then have the credentials issue that you're seeing).
- miguel2 years agoCommunity Admin
is not really an object, but rather a data source function. Every time that you use that function it has the potential to require a new linkage of a connection to its data source path.
Are those databases in the same server? or are you trying to access different servers?If they are in the same server, have you considered using Sql.Databases instead and creating a function that explores the databases in that server and then extracts the data from each table within that Server and then combines them as you see fit?
- miguel2 years agoCommunity Admin
only seeing this now, but yes. The output of a Sql.Databases is a table with all the databases inside of that server.
You can then create a function that goes through each of those databases from the output of the Sql.Databases, retrieves the data that you want and combines it as you see fit.
- AndrewWestran2 years agoHelper I
Hi miguel
I am using the Sql.Database object since I will need to address 2,000 databases containing the same table name (MyTable) to extract the data from these. Will using the tree view not imply me having to manually select all 2,000 tables to achieve the same effect?
Perhaps I am not clear on the tree view functionality that you are referring to here.
Are you perhaps suggesting using navigation code from the Sql.Databases output to draw the second level detail in stead of Sql.Database with unbound connections as you say?