Adding data from other data sources
As described earlier, you have the ability to add data from other types of data sources when working with Analysis Services in the tabular mode. In the next two steps you will first add data from a text file and then from a report. To add data from a file perform the following steps:
First of all you need to create the file. Open up SQL Server Management Studio and connect to the instance containing the
AdventureWorksDW2012
database.Type the following query:
select * from AdventureWorksDW2012..DimProductSubcategory
Press Ctrl + E on the keyboard to execute the statement.
Right-click on the Results grid and select to save the results as a comma-separated file:
Save the file as
ProductSubcategory.txt
.Open the file in Notepad and add the column names on the first row.
Save the file in the UTF-8 format from Notepad.
Note
You can also download the file from the Packt website.
In the SQL Server Data Tools, click on the Import from Data Source button.
Select the Text...