Forum Discussion
Gateway - Data Source best practice
- 4 years ago
I would use a single source for the top most folder. Performance will be the same but maintenance will be simpler.
My vote is strongly in the folder connector corner. In fact, in our company we do not permit any file based connectors.
Thanks for the reply.
So, could I ask, if you had a folder structure something like this...
- Reports
- Report 1
- Data Files
- Report 2
- Data Files
- Report 3
- Data Files
- Report......
Would you have a data source for each "Reportn" folder, or a single data source at the top "Reports" level? I'm not sure if there are any performance or other implications of using a single data source, especially if more than one report is being refreshed at the same time.
- lbendlin4 years agoSuper User
I would use a single source for the top most folder. Performance will be the same but maintenance will be simpler.
- MarkPalmberg4 years agoKudo Commander
Thanks for this reply, lbendlin . In the instance of SQL server data sources, we're thinking of cleaning up our existing sources to have only a single source per server which specifies the Master database. Then, any specific SQL we write against that datasource will include the database name in the object reference. E.g., FROM DATABASE.SCHEMA.TABLE instead of FROM SCHEMA.TABLE. That saves us (I believe?) from having a separate data source for each SERVER/DATABASE combination in use.
Are you aware of any MSFT or other documentation on the best practice here? Thanks for your time!
- lbendlin4 years agoSuper User
MarkPalmberg That would be nice but is doomed to fail for two very different reasons
1. Power BI Service does not support Sql.Databases()
2. Real life will mandate user permission controlled schema access. So not only can you not consolidate connections, you will have scenarios where you have to duplicate the exact same connection because different user credentials have different access scope.
Keep in mind: A gateway connection is created with credentials. These credentials control the access scope, regardless of the end user eventually consuming the connection*. This creates a risk of oversharing that you must be aware of, and mitigate accordingly
* with the exception of connections like SSAS that allow credentials pass-through