-
Notifications
You must be signed in to change notification settings - Fork 247
Description
Describe the bug
A fact table has multiple partitions. The partition query uses an inline table-valued function, of which the parameters change for each partition. It takes a while to return rows (and metadata), even if the partition contains no rows. When refreshing table metadata, after a while the error "unable to validate source query is thrown". When capturing the query that TE sends to the database using profiler (you can use extended events if you want ;), we can see it actually completes successfully. Probably some timeout occurred.
To Reproduce
Steps to reproduce the behavior:
- Have a table with partitions, and the partition query takes a long time to return anything.
- Right-click on the table and select "refresh table metadata
- Wait a while.
- See error
Expected behavior
Since there's no issue with the partition query, the metadata should be able to be refreshed.
Observed behavior
Application specifics
- Tabular Editor version: 2.12.4
- Semantic Engine used: SSAS 2019
- Model Compatibility Level: 1500
Additional context
I could resolve the issue by appending WHERE 1 = 0 to the query of the first partition, effectively short-circuiting the query and returning metadata immediately.
