=Paper=
{{Paper
|id=Vol-1359/paper3
|storemode=property
|title=Linked Data Wrappers atop Yahoo's YQL
|pdfUrl=https://ceur-ws.org/Vol-1359/paper3.pdf
|volume=Vol-1359
|dblpUrl=https://dblp.org/rec/conf/esws/IturriozAD15
}}
==Linked Data Wrappers atop Yahoo's YQL==
https://ceur-ws.org/Vol-1359/paper3.pdf
Services and Applications over Linked APIs and Data – SALAD2015 20
Linked Data Wrappers atop Yahoo’s YQL
Jon Iturrioz, Iker Azpeitia and Oscar Díaz
Univ. of the Basque Country (EHU/UPV), Donostia, Spain. {name.surname}@ehu.es
The Yahoo Query Language (YQL) specializes on providing a framework
for abstracting developers from the heterogeneity of API requests and its opti-
mization [1]. This specialization is what makes YQL attractive for LDW de-
velopment. YQL abstracts APIs through the so-called Open Data Tables
(ODT). As an example, consider Last.fm. This is a music website that pro-
vides information about musical events through an Open API1 . ODTs abstract
API specifics through a table-like view. Figure 1 shows the ODT for the service
lastfm.event.getInfo 2 . Main tags include and . The former
contains descriptive information about the ODT such as author, description or
documentation link 3-5). The bindings indicate how YQL operations are mapped
into API calls. An entry exists for each operation (e.g. ). The sample
case illustrates the SELECT case (10-16): accounts for the URL pattern
to invoke whereas denotes the possible YQL statement input field.
Each field (e.g. event) accounts for variables to be instantiated when SELECT
is enacted. YQL promotes reuse through ODTs so that the YQL community can
tap on someone else’s ODT for their own developments.
ODTs provide a good starting point for LDWs. This entails a double wrap-
ping: YQL wraps APIs as tables while LDWs wrap tables as linked data. Ground-
ing and lifting concerns are considered during the second wrapping. Back to our
running example, this is achieved as follows (see Figure 1).
YQL’s sampleQuery tag is used to describe the URI pattern (line 6) and
the URI grounding (line 7). When a linked wrapper server receives a URI, it
identifies the ODT at hand through pattern matching against the registered
URIPattern at deployment time. This pattern is attached to the linked wrapper
server base URL (e.g. http://www.onekin.org/). The binding (lowering map-
ping) from URI pattern to ODT input parameters is realized through pattern
matching parameters (i.e. line 6 to line 13 {event} binding).
YQL’s function tag is recast for lifting: each YQL tuple (i.e. oneEven-
tXML) is to be turned into an RDF individual (i.e. oneEventJSONLD). The
lifting function holds and . The former indicates the func-
tion’s parameters which are set to , i.e. holds “a tuple” of the ODT table
described à la XML (line 19), and (i.e. to cast the ID for the returned
RDF individual) (line 20). As for , it holds the JavaScript code that
obtains JSON-LD out of the XML tuple (line 22-28). Interlinkage is also de-
scribed here by constructing URIs out of existing parameters, e.g. mo:performer
1
http://www.last.fm/api.
2
Full description at https://github.com/yql/yql-tables/blob/master/lastfm/
lastfm.event.getinfo.xml.
Copyright held by the paper authors
Services and Applications over Linked APIs and Data – SALAD2015 21
Fig. 1. LDW definition for lastfm.event.getinfo.
links to the MusicBrainz resource about the artist (line 27). Noteworthy, this
interlinkage is realized through another LDW.
Benefits are three-fold. First, LDWs are sheltered from changes in the under-
lying APIs. API upgrades are handled at the YQL-table level without impacting
the LDWs built on top. Second, reuse. LDW developers can tap into existing
ODT (1068 at the time of this writing). Third, infrastructure. Yahoo supports
ODT enactment by providing load balancing and graceful performance degrada-
tion. Dereferencing (which implies ODT enactment) then enjoys these pluses. See
it at work by dereferencing http://rdf.onekin.org/lastfm/event/3986264.
References
1. Yahoo! Developer Network. Yahoo Query Language (YQL) guide.
https://developer.yahoo.com/yql/guide/.
Copyright held by the paper authors