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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

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
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors