![Page 1: Necto 16 training 23 - visual studio modeling](https://reader035.vdocument.in/reader035/viewer/2022081604/5899952f1a28ab30328b67dd/html5/thumbnails/1.jpg)
Necto 16 Training Visual Studio modeling (Excel files)
![Page 2: Necto 16 training 23 - visual studio modeling](https://reader035.vdocument.in/reader035/viewer/2022081604/5899952f1a28ab30328b67dd/html5/thumbnails/2.jpg)
Objectives
By the end of this lesson you will be able to describe:
• Basic aspects of Visual Studio Modeling which can be used as a Necto data source
![Page 3: Necto 16 training 23 - visual studio modeling](https://reader035.vdocument.in/reader035/viewer/2022081604/5899952f1a28ab30328b67dd/html5/thumbnails/3.jpg)
Requirements
In order to create a Tabular Model you require:
• Microsoft SQL, an edition that includes Tabular Modeling• SQL Server Data Tools in Visual Studio 2015
• Currently this can be downloaded and installed from here https://msdn.microsoft.com/en-us/mt186501
• Install this on a client machine to create the models remotely on the SQL server.
![Page 4: Necto 16 training 23 - visual studio modeling](https://reader035.vdocument.in/reader035/viewer/2022081604/5899952f1a28ab30328b67dd/html5/thumbnails/4.jpg)
Model Development Flow
• Create Data Sources and Load tables• Create the connection between the Tables• Define Measures• Customize your Model – i.e. Hide or delete unnecessary Columns• Deploy the Model (Use the “Publish” icon) • Optional:
• Automate the Model (Define Partition Mechanism and Processing)• Define Security
![Page 5: Necto 16 training 23 - visual studio modeling](https://reader035.vdocument.in/reader035/viewer/2022081604/5899952f1a28ab30328b67dd/html5/thumbnails/5.jpg)
Creating a New Tabular Model Project• Open SQL Server Data Tools 2015• Open File -> New -> Project
![Page 6: Necto 16 training 23 - visual studio modeling](https://reader035.vdocument.in/reader035/viewer/2022081604/5899952f1a28ab30328b67dd/html5/thumbnails/6.jpg)
Creating a New Tabular Model Project• SSDT will now try to validate
your Tabular instance and set the correct compatibility mode, take advantage of this and manually it is harder to find and do.
• Once the connection is established click ‘OK’
![Page 7: Necto 16 training 23 - visual studio modeling](https://reader035.vdocument.in/reader035/viewer/2022081604/5899952f1a28ab30328b67dd/html5/thumbnails/7.jpg)
Create a Data Source• To add data click or
select ‘Model -> Import from data source…’
• Excel is a choice here and for ease of use this is the option chosen.
![Page 8: Necto 16 training 23 - visual studio modeling](https://reader035.vdocument.in/reader035/viewer/2022081604/5899952f1a28ab30328b67dd/html5/thumbnails/8.jpg)
Create a Data Source (continued)• Choose a name and
select the path of the Excel file
• Test the connectivity and use the first for headers if that is the setup of the file.
• Select the impersonation information in the next step.
![Page 9: Necto 16 training 23 - visual studio modeling](https://reader035.vdocument.in/reader035/viewer/2022081604/5899952f1a28ab30328b67dd/html5/thumbnails/9.jpg)
Create a Data Source (continued)• Select the Sheet(s) to use,
select a friendly name for the imported table if required.
• You can preview and or filter if required, when you are satisfied, click Finish.
![Page 10: Necto 16 training 23 - visual studio modeling](https://reader035.vdocument.in/reader035/viewer/2022081604/5899952f1a28ab30328b67dd/html5/thumbnails/10.jpg)
Create connections between the tables • I imported 2 tables one
fact and the other a dimensions for this module
• In the bottom left of this screen you can move between tabular and design display types
• Drag City to City to join them with a 1:n relationship
![Page 11: Necto 16 training 23 - visual studio modeling](https://reader035.vdocument.in/reader035/viewer/2022081604/5899952f1a28ab30328b67dd/html5/thumbnails/11.jpg)
Create a new Hierarchy• Select State and City in
the Geo table and select ‘Create Hierarchy …’
• The Hierarchy can be used to slice the fact table in Necto
![Page 12: Necto 16 training 23 - visual studio modeling](https://reader035.vdocument.in/reader035/viewer/2022081604/5899952f1a28ab30328b67dd/html5/thumbnails/12.jpg)
Define Measures• In Tabular display
mode, you can select a column header and press on the button to create an auto sum measure.
• The Measures appear in the lower window
• If you want to add a new column this is called a calculated column
![Page 13: Necto 16 training 23 - visual studio modeling](https://reader035.vdocument.in/reader035/viewer/2022081604/5899952f1a28ab30328b67dd/html5/thumbnails/13.jpg)
Customize the Model• Select the column City
and right click, then Hide from Client Tools
• The City will not be seen in Necto as it was not needed because the Geography hierarchy can be used
![Page 14: Necto 16 training 23 - visual studio modeling](https://reader035.vdocument.in/reader035/viewer/2022081604/5899952f1a28ab30328b67dd/html5/thumbnails/14.jpg)
Deploy Model• Once all of your
modifications are complete you can Deploy the model
• Deploy with Build, Deploy and Process the model
• Now you can find the model through Necto.
![Page 15: Necto 16 training 23 - visual studio modeling](https://reader035.vdocument.in/reader035/viewer/2022081604/5899952f1a28ab30328b67dd/html5/thumbnails/15.jpg)
Thank you, any questions?