1 / 34

Building Adaptive Payment Systems with YQL

Presentation on "Building Adaptive Payment Systems using YQL" presented at PayPal X Innovate 2010

jcleblanc
Download Presentation

Building Adaptive Payment Systems with YQL

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Constructing "SELECT * Constructing "SELECT * FROM Internet" Payment FROM Internet" Payment Tools Tools Using the Yahoo! Query Language

  2. 2

  3. What We’ll Learn 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 3

  4. 4

  5. 5

  6. Making Queries SELECT * FROM Internet 6

  7. YQL Test Console Available At: http://developer.yahoo.com/yql/console 7

  8. Running Queries - SELECT Query Structure SELECT myColumn, myTitle FROM myTable(0, 50) WHERE myColumn = 'value' AND myTitle = 'title' LIMIT 3 OFFSET 10 | sort(field='myColumn') | reverse() 8

  9. Running Queries - INSERT / UPDATE / DELETE 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 9

  10. Running Queries – Sub-selects with the IN clause SELECT * FROM flickr.photos.search WHERE (lat, lon) IN (SELECT centroid.latitude, centroid.longitude FROM geo.places WHERE text="SFO") 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

  12. Running Queries – Table Syntax YQL Command: DESC tablename 12

  13. Running Queries – URL Format http://query.yahooapis.com/v1/yql?[params] http://query.yahooapis.com/v1/public/yql?[params] Params • q=[QUERY] • format=[XML / JSON] • diagnostics=[true / false] • debug=[true / false] • callback=[function name] 13

  14. Running Queries – URL Format http://query.yahooapis.com/v1/yql?[params] http://query.yahooapis.com/v1/public/yql?[params] Params • q=[QUERY] • format=[XML / JSON / JSONP / JSONP-X] • diagnostics=[true / false] • debug=[true / false] • callback=[function name] 14

  15. Driving Traffic Back to your Services 15

  16. YQL Open Data Tables Wrap Your Own API or Data Source 16

  17. Open Data Tables – XML File Syntax <?xml version="1.0" encoding="UTF-8"?> <table xmlns="http://query.yahooapis.com/v1/schema/table.xsd"> <meta></meta> <bindings></bindings> </table> 17

  18. Open Data Tables – XML File Syntax <?xml version="1.0" encoding="UTF-8"?> <table xmlns="http://query.yahooapis.com/v1/schema/table.xsd"> <meta></meta> <bindings></bindings> </table> 18

  19. Open Data Tables – XML File Syntax <?xml version="1.0" encoding="UTF-8"?> <table xmlns="http://query.yahooapis.com/v1/schema/table.xsd"> <meta> <author>Jonathan LeBlanc</author> <description>My Table</description> <documentationURL>www.site.com</documentationURL> <sampleQuery>SELECT * FROM {table} </sampleQuery> </meta> <bindings></bindings> </table> 19

  20. Open Data Tables – XML File Syntax <?xml version="1.0" encoding="UTF-8"?> <table xmlns="http://query.yahooapis.com/v1/schema/table.xsd"> <meta></meta> <bindings></bindings> </table> 20

  21. Open Data Tables – XML File Syntax <table xmlns="http://query.yahooapis.com/v1/schema/table.xsd"> <meta></meta> <bindings> <select itemPath="" produces="XML" > <urls> <url env="all”>http://www.site.com/{user}</url> </urls> <inputs> <key id="user" type="xs:string" paramType="path" required="true" /> </inputs> </select> </bindings> </table> 21

  22. Open Data Tables – Invoking a Table Definition 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" 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

  24. 24

  25. Mapping Social Data to Products Location Regional Products Product Suggestions Interests Specialty Merchandise Profession Suggest to Friends Friends Birthday / Anniversary Seasonal / Targeted Products 25

  26. YQL Execute Extending Open Data Tables 26

  27. YQL Execute – XML File Syntax 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 27

  28. YQL Execute – XML File Syntax <?xml version="1.0" encoding="UTF-8"?> <table xmlns="http://query.yahooapis.com/v1/schema/table.xsd"> <meta></meta> <bindings> <select itemPath="" produces="XML" > <urls></urls> <inputs></inputs> </select> </bindings> </table> 28

  29. YQL Execute – XML File Syntax <?xml version="1.0" encoding="UTF-8"?> <table xmlns="http://query.yahooapis.com/v1/schema/table.xsd"> <meta></meta> <bindings> <select itemPath="" produces="XML" > <urls></urls> <inputs></inputs> <execute></execute> </select> </bindings> </table> 29

  30. YQL Execute – XML File Syntax <execute> <![CDATA[ var arrQueries = inputs['query'].split('|'); var elQueries = <queries/>; . . . ]]> </execute> 30

  31. Global Disaster Alert and Coordination System Table Available At: http://github.com/yql/yql-tables Under gdacs/gdacs.current.xml 31

  32. Conclusion Build adaptive applications faster (and that run faster) 32

  33. YQL Documentation http://developer.yahoo.com/yql YQL Console http://developer.yahoo.com/yql/console YQL Github Account (Contribute Tables) http://github.com/yql/yql-tables 33

  34. Thank You Questions? 34

More Related