SQL<br />Importing OData<br />Contents TOC o "
h z u Example Synchronising OData Feed to a SQL Server Table PAGEREF _Toc257881703 h 3Overview PAGEREF _Toc257881704 h 3Connect OData Data Source PAGEREF _Toc257881705 h 3Data Source Connected PAGEREF _Toc257881706 h 5Create SQL Table PAGEREF _Toc257881707 h 6Both Data Sources Mapped PAGEREF _Toc257881708 h 8Compare Results PAGEREF _Toc257881709 h 9Synchronise PAGEREF _Toc257881710 h 10Results PAGEREF _Toc257881711 h 11<br />Example Synchronising OData Feed to a SQL Server Table<br />Overview<br />In this example we are going to synchronise the data from a public OData feed into a new SQL Server Database table.<br />We’re using the sample Northwind OData service from here http://services.odata.org/Northwind/Northwind.svc/<br />Connect OData Data Source<br />Click the “Connect Data Source” link on Data Source A and locate the OData provider in the list. First of all you should enter the Url to the service in the ServiceUrl field.<br />Once you have entered the ServiceUrl you can choose an Entity from the Entity dropdown list. This causes the provider to query the service for all the available entities so you can easily select one. In this example were choosing the Products entity. <br />Select the “Products” entity from the drop down.<br />Data Source Connected<br />Now you can see that the entity has been discovered and is now displayed in Data Sync.<br />Create SQL Table<br />Next we need to create a SQL Table to store the data from the OData service, to do this just go to the Tools menu and select “Create SQL Table”<br />This starts the SQL Table creation Wizard which steps through the process of creating a SQL Table to store the data.<br />Select the Database and choose a name for your new Table.<br />Clicking Finish will create this Table in your database from the schema in the Schema Map.<br />Both Data Sources Mapped<br />Both Data sources are now Mapped in Data Sync and ready to be compared to look for missing data. As this is the first run our SQL Table is empty so were expecting all rows from the OData service to be detected.<br />Click on “Compare A->B” to execute the comparison.<br />Compare Results<br />After the Comparison has run you are able to see the detected changes, here we can see that 77 new records have been found.<br />To Synchronise the data click the “Synchronise” toolbar button.<br />Synchronise<br />This opens the Synchronise Data window where you start the synchronisation and can view the progress as this is a small set of data it will be very quick.<br />Press “Start” to Synchronise the data.<br />Results<br />Now if you view the SQL Table in your database you will see that the table is fully populated.<br />