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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
bl_g
New Member

Custom connector: refresh in Desktop without clearing cache gives 'The key didn't match any rows'

We have created a Power BI custom connector that connects to our webservice. The connector works with a nested folder structure. The user selects one or more tables from one or more folders. Part of the connector's structure (folder and table names) is fixed, while other parts are dynamic (depend on the data the user has in their webservice).

 

The problem which our users experience, is that they often have to clear the cache in Power BI Desktop for a refresh to work successfully. If they don't clear the cache, they get an error saying: 'The key didn't match any rows in the table'. To our best knowledge, this error means that Power BI cannot find the table with the given name and folder-path.

 

However, this error also occurs if a user refreshes a (report created with a) table that has a fixed name and path, in which case this error seems to not apply.

 

Is this a known issue? Is there a fix or workaround (other than clearing the cache each time before a refresh)? Is it indeed caused by the custom connector's structure being partly dynamic?

 

Any help is greatly appreciated!

2 REPLIES 2
Akash_Varuna
Community Champion
Community Champion

Hi @bl_g It might be because of the difference between cached metadata and the dynamic structure of your custom connector. To fix this, disable metadata caching using [IsResourcePathRequired = false], and implement schema refresh logic in your connector. Minimize overly dynamic structures where possible and guide users to clear cache only as a last resort. Debug with Data Source Diagnostics to pinpoint schema mismatches.

freginier
Solution Sage
Solution Sage

Hi

 

Yes, this is a known issue when using custom connectors with dynamic metadata in Power BI. The error 'The key didn't match any rows in the table' typically appears when Power BI's data preview or schema cache is out of sync with the actual structure returned by the connector.

Cause:

Power BI caches metadata (e.g., schema, table names, paths) during navigation. If your connector has dynamic folder or table structures that change between loads, Power BI may try to reference outdated paths or fields, resulting in the key mismatch error.

Workarounds:

  1. Implement SupportsDirectQuery = false in the connector
    Forces Power BI to re-fetch metadata during refresh rather than rely on cache.

  2. Use Odbc.DataSource-style navigation table
    Implement the NavigationTable pattern using fixed columns like Name, Kind, Item, Data. This helps Power BI recognize stable navigation paths and reduces cache mismatch risk.

  3. Add static fallback metadata
    For dynamic tables, return a consistent schema or wrapper that hides volatility from Power BI (e.g., include all possible columns and use nulls where not applicable).

  4. Force cache busting programmatically
    Use a query parameter (e.g., version or timestamp) in the URL or function signature so each refresh appears new to Power BI.

  5. Document and guide users to "File > Options > Data Load > Clear cache" when errors occur — though not ideal, it's the only workaround when metadata volatility is unavoidable.

There’s no full fix currently unless the dynamic structure is stabilized or wrapped.

 

freginier

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.