3. 1. Delivering Upsell Content from YQL Data
Sources
1. Driving Traffic Back to Your Services with
Open Data Tables
1. Mashing up Multiple Data Sources with
Server-Side JavaScript
What We’ll Learn
3
8. SELECT myColumn, myTitle
FROM myTable(0, 50)
WHERE myColumn = 'value' AND myTitle = 'title'
LIMIT 3 OFFSET 10 |
sort(field='myColumn') | reverse()
Running Queries - SELECT Query Structure
8
9. Modify Data on the Internet
Create Tweets, Add Blog Entries, Update Databases
Current Tables Using I/U/D
Twitter Status, bit.ly URL Shortner, Yahoo! Profile Status
/ Update
Stream, Amazon
SimpleDB
Running Queries - INSERT / UPDATE / DELETE
9
10. SELECT * FROM flickr.photos.search
WHERE (lat, lon)
IN (SELECT centroid.latitude, centroid.longitude FROM
geo.places WHERE text="SFO")
Running Queries – Sub-selects with the IN clause
10
11. Running Queries – Available Tables
YQL Command: SHOW Tables
Number of Standard Tables: 169
Number of Community Tables: 771
Total Number of Tables: 940
Contribute Tables to:
http://www.github.com/yql/yql-tables/
11
22. The USE clause
USE "http://alavilli.com/yql/paypal_txn_table.xml"
AS paypal_txn_table;
SELECT * FROM paypal_txn_table
WHERE StartDate="2010-06-12T00:00:00.000Z"
AND APIUsername="xxx" AND APIPassword="xxx"
AND Signature="xxx"
Open Data Tables – Invoking a Table Definition
22
23. New PayPal Tables!
Available At: http://github.com/yql/yql-tables
Transaction Search: paypal/paypal.transaction.xml
Transaction Details: paypal/paypal.transactions.details
23
27. Augment data
Collect geographic data based on a free-form text location
Create APIs from web pages
Build your very own ScrAPI
Data Transformations
Convert the results from xml to Google's kml format
Move business logic of your application to the cloud
YQL Execute – XML File Syntax
27