Sample Header Ad - 728x90

SSAS Tabular model table load from query with #temp table fails

0 votes
2 answers
1598 views
We have several situations where complex queries are being used for creating/populating tables in our SSAS tabular model. The actual use cases cannot be presented here, due to both proprietary information and pure length of queries, but the following test case illustrates the situation: SELECT s.Servername, i.instanceID, i.InstanceName, i.ClientVersion, i.MajorVersion INTO #InstanceList FROM ServerLookup s INNER JOIN InstanceLookup i ON i.ServerID = s.ServerID SELECT i.Servername, i.InstanceName, i.ClientVersion, i.MajorVersion, im.EntryDescription, im.MonitorID INTO #InstanceMonitoring FROM #InstanceList i INNER JOIN InstanceMonitor im ON im.InstanceID = i.InstanceID SELECT i.ServerName, i.instanceName, m.MonitorName, m.MonitorDescription FROM #InstanceMonitoring i INNER JOIN MonitorLookup m on m.MonitorID = i.MonitorID The query runs fin in SSMS, but when we attempt to create a table in our tabular model, it throws the following error message: > Failed to save modifications to the server. Error returned: 'OLE DB or ODBC error. '. There is no further information on the error. I haven't been able to locate any documentation stating that temp tables can't be used in creating a tabular model table, and I'm reluctant to tell my developer community it can't be done without some information to back it up.
Asked by Kris Cook (23 rep)
Apr 22, 2019, 08:30 PM
Last activity: Nov 7, 2019, 04:03 AM