View and Save the Results of a Prediction Query
Applies to: SQL Server 2019 and earlier Analysis Services Azure Analysis Services Fabric/Power BI Premium
Important
Data mining was deprecated in SQL Server 2017 Analysis Services and now discontinued in SQL Server 2022 Analysis Services. Documentation is not updated for deprecated and discontinued features. To learn more, see Analysis Services backward compatibility.
After you have defined a query in Microsoft SQL Server SQL Server Analysis Services by using Prediction Query Builder, you can run the query and view the results by switching to the query result view.
You can save the results of a prediction query to a table in any data source that is defined in a Microsoft SQL Server SQL Server Analysis Services project. You can either create a new table or save the query results to an existing table. If you save the results to an existing table, you can choose to overwrite the data that is currently stored in the table; otherwise, the query results are appended to the existing data in the table.
Run a query and view the results
On the toolbar of the Mining Model Prediction tab of Data Mining Designer in SQL Server Data Tools, click Result .
The query results view opens and runs the query. The results are displayed in a grid in the viewer.
Save the results of a prediction query to a table
On the toolbar of the Mining Model Prediction tab in Data Mining Designer, click Save query result.
The Save Data Mining Query Result dialog box opens.
Select a data source from the Data Source list, or click New to create a new data source.
In the Table Name box, enter the name of the table. If the table already exists, select Overwrite if exists to replace the contents of the table with the query results. If you do not want to overwrite the contents of the table, do not select this check box. The new query results will be appended to the existing data in the table.
Select a data source view from Add to DSV if you want to add the table to a data source view.
Click Save.
Warning
If the destination does not support hierarchical rowsets, you can add the FALTTENED keyword to the results to save as a flat table.