#ProjectOnline data via #ODATA and #SSIS in #SQL database table on-premise #MSProject #SharePointOnline #BI #SSRS #Office365 #Cloud
I am a Project Server and SharePoint consultant but my main focus currently is around Project Server.
I have been working with Project Server for nearly five years since 2007 for a Microsoft Gold Certified Partner in the UK, I have also been awared with the Microsoft Community Contributor Award 2011. I am also a certified Prince2 Practitioner. This article has been cross posted from pwmather.wordpress.com (original article) |
Following on from my post earlier today regarding the SSIS component that enables you to extract data from ODATA feeds in Office 365, I have created a blog post that demonstrates this new functionality. See the steps below:
Firstly I installed the SQL Server data tools and Integration Services feature on my Test Project Server / SharePoint 2013 box (only server I had available at the time). Once you have access to SQL Server data tools, download and install the ODATA SSIS component from the link below:
Also if this isn’t on a SharePoint / Project Server 2013 server – which in reality it wont be, you will also probably need the SharePoint client DLLs, these can be downloaded here:
When I tried the new SSIS component on the SQL 2012 Server the connection failed and it complained about the SharePoint.Client.Runtime.dll:
I didn’t test deploying the SharePoint client components to the SQL Server but I guess this should work.
Once everything is in place, launch SQL Server data tools for SQL Server 2012 and create a new Integration Services project:
Click OK and you will see the following screen:
On the control flow tab, at the bottom you will see Connection managers. Right click and create a new OLEDB Connection to the target database:
Before I created this, I did create a new empty SQL database:
Create another connection to the ODATA feed URL using the New Connection > ODATA option:
Create the ODATA connection to your ODATA tenant:
Specify an account that has access to the ODATA feed. Notice the Service document location is just the base ProjectData ODATA URL.
Click the All button and change the Microsoft Online Services Authentication to True:
Test the connection to confirm it is successful then click ok.
Add a Data Flow Task to the control flow:
Double click the data flow task and you will go to the Data flow tab:
Drag ODATA source from the toolbox to the data flow sheet:
Double click the ODATA source to see the properties:
Complete the details, selecting the ProjectOnlineODATAFeed connection and you will see the Collection property load the collection, in this case it is the tables on the ODATA feed:
Once loaded you will see the familiar ODATA entities:
In this example we will only use the Projects feed:
Click the Columns page on the left hand side and select the columns you want:
Click OK.
Drag the Destination Assistant from the SSIS toolbox to the Data Flow sheet and the new destination window will open:
Select the previously created SQL Server OLE DB connection:
Click OK.
Double click the OLEDB Destination component to load the editor:
Click the New button next to to the table details to create a new table, give the table a name, replace “OLE DB Destination” with the table name you want:
Click OK. At this point if we look at the SQL database we will see the new table and columns:
Back in the SSIS package click the Mappings page, here you can see the field mappings from the ODATA feed to the SQL table:
Click OK and you will see the following flow:
Run the package using the green arrow:
Once run successfully you will see the following:
If we switch back to the SQL server and see what is stored in the table you will see the project data from your Project online tenant:
Now the data is local you can use SQL Server Reporting Services to create reports, you can integrate this data into other LOB systems or create a custom OLAP cube etc. Once you are happy with the package you can set the package to run on a schedule to periodically copy the data down. There are plenty of references on the web for creating SSIS packages so have a search.
This is a basic example but hopefully gives you the idea of what is now possible