O, There’s My DataThe Open Data Protocol (OData)Steve HughesPrincipal Consultant, Magenic7/17/2012Minnesota SQL Server Use...
I called you all here …» Mark Souza» Why use OData?» Is it really necessary for Data Pros?
Introducing the Open Data Protocol» Commonly known as OData» Built on established protocols  » REST  » Atom  » HTTP» Open ...
OData Feeds» Data structure support  » Tables  » Foreign keys  » Stored procedures» Data type support  » Originally design...
Entity Data Model» This is the structure of the feed» Entity Type  » Individual entity in the feed, similar to a row» Enti...
Building a ModelUsing Visual Studio to build a model
Windows Communication Foundation» “WCF is a unified programming model for building service-oriented  applications.” – MSDN...
Building a WCF ServiceUsing Visual Studio to create the WCF Data Service
Native OData Support» Consumers (read feeds)  » PowerPivot & SSAS Tabular  » Reporting Services» Distributors (expose feed...
PowerPivot DemoConsuming our OData feed with PowerPivot for Excel
Painful OData Support a.k.a. SSIS» SSIS does not natively support OData feeds» My goal – use OData as an SSIS Source» Tech...
OData Feed in SSISShowing how to retrieve data from OData feeds in SSIS
References» Connecting to Windows Azure SQL Database Through WCF:    http://msdn.microsoft.com/en-us/library/windowsazure/...
Wrap Up» Creating an OData feed requires .NET coding» Consuming an OData feed – Native vs Custom»Q&A
Steve Hughes»   Principal Consultant with Magenic»   Over 15 years with SQL Server»   Chair of Minnesota SQL Server User G...
Upcoming SlideShare
Loading in...5
×

O Theres My Data The Open Data Protocol (O Data)

1,580

Published on

Presented @ PASSMN on July 17, 2012

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
1,580
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • New ProjectUse WCF Service Application TemplateNeed to Run As Admin to support IIS workRemove .cs file and App_Data, not needed for this solutionAdd New Item – Data – ADO.NET Entity Data ModelUse Wizard and Generate from DatabaseChoose data connection – AdventureWorks 2008 versionChoose your database objectsChoosing Department and EmployeeClick Finish to generate modelView model browser – note entity sets are pluralized entity types
  • Add New Item – Web – WCF Data Service(remove other service)Open .svc.cs fileAdd DataService Name in class definitionAdd config.SetEntitySetAccessRule(“MyEntitySet”,EntitySetRights.AllRead); for each table to be exposed as an entity setDebug - .svc file to see Atom definition
  • In PowerPivot windowChoose Connect to a Data FeedGive it a nameUse the URL from the feed - .svcChoose tables which are actually entity setsClick finishNOTE: for my demo to work I needed to change the connection string in the package to use an SQL user. Otherwise it will pass windows credentials, I am not on a domain so that is likely my issue.
  • Walk through both packagesStart with UsingATOMCreate ATOM FileProcess ATOM FileLoad DataThen UsingRSSGet ODataSource Script Component walk through
  • Transcript of "O Theres My Data The Open Data Protocol (O Data)"

    1. 1. O, There’s My DataThe Open Data Protocol (OData)Steve HughesPrincipal Consultant, Magenic7/17/2012Minnesota SQL Server User Group Meeting
    2. 2. I called you all here …» Mark Souza» Why use OData?» Is it really necessary for Data Pros?
    3. 3. Introducing the Open Data Protocol» Commonly known as OData» Built on established protocols » REST » Atom » HTTP» Open specification from Microsoft» Designed to expose data from a variety of sources
    4. 4. OData Feeds» Data structure support » Tables » Foreign keys » Stored procedures» Data type support » Originally designed to support SQL 2008 and Entity Framework » Designed to be flexible » For example, Oracle EF implementation can be supported
    5. 5. Entity Data Model» This is the structure of the feed» Entity Type » Individual entity in the feed, similar to a row» Entity Key » One or more entity properties making each entity type unique in the feed» Entity Set » Collection of entities, essentially a table» Service Operation » Function or stored procedures that can be used in the feed
    6. 6. Building a ModelUsing Visual Studio to build a model
    7. 7. Windows Communication Foundation» “WCF is a unified programming model for building service-oriented applications.” – MSDN (http://msdn.microsoft.com/en- us/library/dd936243.aspx)» WCF supports multiple network protocols including HTTP and TCP» WCF supports multiple message formats such as SOAP and REST» We will use a WCF project to expose an OData feed based on our entity model
    8. 8. Building a WCF ServiceUsing Visual Studio to create the WCF Data Service
    9. 9. Native OData Support» Consumers (read feeds) » PowerPivot & SSAS Tabular » Reporting Services» Distributors (expose feeds) » Windows Azure Table Storage » Windows Azure Marketplace » SharePoint » Stack Overflow
    10. 10. PowerPivot DemoConsuming our OData feed with PowerPivot for Excel
    11. 11. Painful OData Support a.k.a. SSIS» SSIS does not natively support OData feeds» My goal – use OData as an SSIS Source» Technology tried along the way » LINQ » Able to connect to the feed but not the right tool for SSIS » ATOM & XML » Works – creates files on the server, not the best option, but it works » DataServiceQuery » Works – allows us to create SSIS Source task which returns rows
    12. 12. OData Feed in SSISShowing how to retrieve data from OData feeds in SSIS
    13. 13. References» Connecting to Windows Azure SQL Database Through WCF: http://msdn.microsoft.com/en-us/library/windowsazure/ee621789.aspx» Loading Data from an ATOM Data Feed into SQL Server: http://channel9.msdn.com/Learn/Courses/SQL2008R2TrainingKit/SQL10R2UPD01/S QL10R2UPD01_HOL_03/Exercise-1-Loading-Data-from-an-ATOM-Data-Feed-into- SQL-Server» SSIS – Using a Script Component as a Source http://www.ssistalk.com/2007/04/04/ssis-using-a-script-component-as-a-source/» DataServiceContext Class: http://msdn.microsoft.com/en- us/library/system.data.services.client.dataservicecontext.aspx» Chris Woodruff – 31 Days of OData Blog Series: http://chriswoodruff.com/2011/11/19/announcing-the-31-days-of-odata-blog- series/
    14. 14. Wrap Up» Creating an OData feed requires .NET coding» Consuming an OData feed – Native vs Custom»Q&A
    15. 15. Steve Hughes» Principal Consultant with Magenic» Over 15 years with SQL Server» Chair of Minnesota SQL Server User Group (PASSMN)» PASS Regional Mentor for US-NorthEast Region» Contact Info » Blog: http://www.dataonwheels.com » Twitter: @DataOnWheels » Email: steveh@magenic.com

    ×