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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
AlanBourke
Frequent Visitor

Custom connector - restricting the databases and objects available.

I'm playing around with a custom connector based off the SqlOdbc sample. It will be connecting to MSSQL data.

 

For tidiness within Power BI Desktop, when the user elects to use this connector to get data, I would like:

 

  1. Only a subset of the databases on the server to be presented, probably based on a naming scheme, e.g. only list databases named like 'MyBusinessUnit1', 'MyBusinessUnit2' and so forth.
  2. One the user has selected a database, only certain views to be presented, again probably based on name. such as 'PBISales', 'PBICustomers' and so forth.

 

What I have done so far is on the MSSQL side. I have created a schema, only added the required views to the schema, then added a login tied to that schema, and made the connector use that login with username\password authentication.

 

Which is fine, except when in Power BI Desktop Get Data, all server databases are listed, but any that the SQL login doesn't have access to show an ODBC error under them.

 

I'm guessing that I could add an SQLTables function handler in the .pq file to somehow filter the list of tables returned but have no clue what the syntax there would be. Can anyone suggest anything?

0 REPLIES 0

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.