← Alle Beiträge

Using Dynamics NAV 2013 OData Services with SSAS 2012 Multidimensional

SSAS Multidimensional kann keine OData-Feeds lesen. Der Umweg über Integration Services und eine relationale Zwischenschicht — mit allen Fallstricken.

Diesen Beitrag gibt es nur auf Englisch.

Archive post from 2014. It describes Dynamics NAV and the Microsoft BI tools of that time; Dynamics 365 Business Central and today’s Power BI differ in places.

While SSAS Tabular and PowerPivot allow to directly connect to OData feeds, SSAS Multidimensional is limited to relational databases and Microsoft Access. So in order to use the data as source for an SSAS cube it has to be transferred to a relational database. Since we are already working with SQL Server we would like to use Integration Services to achieve this and thanks to the recently released (but long overdue) OData Source for Microsoft SQL Server® 2012 it is now easily possible. Prior to this release, there was no native connector for OData sources in SSIS so the connection had to be coded and was not fully supported.

We will build a simple fact table with some sales data and a date and customer dimension.

Providing NAV OData Feeds

First we need to create the query / page objects in Dynamics NAV and publish them as OData feeds.

As basis for our date dimension I am reusing the date table we have used in a previous post our earlier post.

Using Dynamics NAV 2013 OData Services with SSAS 2012 Multidimensional

As fact table I have created a simple query based on the sales invoice header and sales invoice line that includes the bill to customer number and the posting date as dimension keys and the quantity and line amount as measures.

Using Dynamics NAV 2013 OData Services with SSAS 2012 Multidimensional

As source for our customer dimension, we will simply use the standard customer list (Page 22).

To publish these objects as OData web services I switch to the RoleTailored client and search for “web services”. Via “edit list” we add the three objects and set the publish check box.

Using Dynamics NAV 2013 OData Services with SSAS 2012 Multidimensional

Creating the SSIS Jobs

First, we download and install the Microsoft OData source plugin for SSIS.

After this is done we switch to visual studio and create a new SSIS-Project “OData_Demo”.

Note that after inserting a DataFlow task, we can see the new option under “Common”.

Using Dynamics NAV 2013 OData Services with SSAS 2012 Multidimensional

We insert the “ODate Source” element and are prompted to choose the OData connection manager. We create a new one called “OData source”. Now we have to specify the “Service document location”. This is the base part of the OData connection URL we can see in the “Web Services” view in NAV, in our case:

http://test-server:7048/DynamicsNAV71/OData/

Using Dynamics NAV 2013 OData Services with SSAS 2012 Multidimensional

Nevertheless the data source needs to point to a specific resource. In the dialog we choose “Resource path” and enter the second part of the OData URL:

Company(‘CRONUS%20EXT%20AG’)/PostedSalesDocs

When we click on “Preview” we will see the first 20 lines from our NAV web service.

Using Dynamics NAV 2013 OData Services with SSAS 2012 Multidimensional

We insert an “OLE DB Destination”, specify the connection to our relational database and create a destination table “PostedSalesDocs”. You can use a “DataConversion” component to adjust the data types since some of the string sizes in the OData Feed might not be specified and will by default be set to “max”.

Using Dynamics NAV 2013 OData Services with SSAS 2012 Multidimensional

We repeat these steps for our remaining data sources DimDate and DimCustomer and run the job.

Using Dynamics NAV 2013 OData Services with SSAS 2012 Multidimensional

Creating the SSAS Cube

After the ETL part is finished we can start building the cube. We create a new SSAS Project and point the data source to our relational database. Now we create a data source view, import our three tables and set the table relationships.

Using Dynamics NAV 2013 OData Services with SSAS 2012 Multidimensional

Next, we model our date and customer dimension. I created a simple hierarchy for both dimensions and added a couple of additional attributes.

Using Dynamics NAV 2013 OData Services with SSAS 2012 Multidimensional

The last remaining step will be to build the cube based on our fact table and add the two measures and a line count.

Using Dynamics NAV 2013 OData Services with SSAS 2012 Multidimensional

We can now process the cube and view the result in Microsoft Excel.

Using Dynamics NAV 2013 OData Services with SSAS 2012 Multidimensional
Nächster BeitragBenchmarking in Power Pivot with NAV

Fragen zu diesem Thema?

Sprechen Sie uns an — wir teilen unser Wissen gerne, auch über den Blog hinaus.

Kontakt aufnehmen