Publication Alternatives: Hybrid Data Services Table Views Presented by Tim Whiteaker The University of Texas at Austin 4 June, 2009
Ingest Data From Different Sources Transform Data into Uniform Format with ODM Data Loader Load Newly Formatted Data into ODM Tables in MS SQL/Server Wrap ODM with WaterML Web Services for Online Publication Texas Parks and Wildlife Dept Texas Water Development Board Texas Instream Flow Program ODM Water Data Service TPWD ODM TWDB ODM TIFP ODM Observations Data Model (ODM) WaterML
TCOON METADATA ODM TCOON DataValues WaterML Metadata From: ODM Database in Austin TCOON Web Site in Corpus Christi TCOON Water Data Service Hybrid Water Data Service TCOON Metadata are Transferred from XML to the ODM Web Services can both Query the ODM for Metadata and use a Web Scraper for Data Values Calling the WSDL Returns Metadata and Data Values as if from the same Database GetSites GetSiteInfo GetVariableInfo Get Values from:
Hybrid Water Data Service GetSites GetSiteInfo GetVariableInfo GetValues Hybrid Data Service Architecture METADATA ODM ODM Web Service GetSites GetSiteInfo GetVariableInfo GetValues Remote Data Source Remote Data Source
TCOON Example
Use Data Query to get data
Form query, click button, get data…
…after completing this brief survey
Data returned as text with header Unique URL Header + Values
Deciphering the URL &elev=stnd stnlist=014&serlist=pwl&when=07/23/ /30/2008 &whentz=UTC0&-action=c&unit=metric&interval=360
Deciphering the URL &elev=stnd stnlist=014 &serlist=pwl &when=07/23/ /30/2008 &whentz=UTC0 &-action=c &unit=metric &interval=360
Steps to Building the Service Harvest Metadata into ODM Wrap with WaterOneFlow (private) Write Service to handle GetValues – Metadata from private service – Time series from TCOON website (via URL) TCOON DataValues TCOON METADATA ODM
Programming the Web Service Web Service with ODM Metadata WaterOneFlow Helper (WaterOneFlow helper is included with the ODM web service)
Metadata from Private Service GetSites in 3 lines of code!! Piggyback off your ODM service
Populating the TimeSeries Object The work is in GetValues
Building the URL Use Site, Variable, and Dates to make URL Default any other parameters
Retrieving Values from the Website Build the URL Scrape the website
Parsing the Website Response Process each line of text Assign to TimeSeries Object
Returning the TimeSeries Object
TCOON Hybrid Water Data Service GetSites GetSiteInfo GetVariableInfo GetValues TCOON Data Service Architecture METADATA ODM TCOON Metadata Web Service GetSites GetSiteInfo GetVariableInfo GetValues TCOON Website
Summary – Hybrid Data Services All methods except GetValues simply call the metadata service on ODM GetValues reads remote website on the fly Handy for dynamic data sources TCOON METADATA ODM TCOON DataValues WaterML TCOON Water Data Service
Table Views
Wear the ODM Hat Your Database WaterOneFlow Web Service ODM View
Example: The ‘NotODM’ Database Table names different Field names different
Creating the View Change field names Result
Saving the View Use an ODM Table Name
WaterOneFlow Can Read Views Not ODM WaterOneFlow Web Service ODM View No Programming Required!
When to Use Publication Alternatives Hybrid Service – You can get site locations and variable info, but do not wish to populate your database with time series values Table View – You already have a SQL Server database that maps fairly easily to ODM, and you see no need to duplicate the data by loading into a separate ODM database