SlideShare a Scribd company logo
Intro to new Google cloud technologies: Google Storage, Prediction API, BigQuery
Introducción a las nuevas tecnologías
       de plataforma cloud de Google

  APIs de Almacenamiento, Predicción y BigQuery




Chris Schalk
Sept 23rd, 2010
Agenda


  Google Storage for Developers
  Prediction API & BigQuery
Google Storage for Developers
       Store your data in Google's cloud
What Is Google Storage?



  Store your data in Google's cloud
     any format, any amount, any time

  You control access to your data
    private, shared, or public

   Access via Google APIs or 3rd party tools/libraries
Sample Use Cases

 Static content hosting
 e.g. static html, images, music, video

 Backup and recovery
 e.g. personal data, business records

 Sharing
 e.g. share data with your customers

 Data storage for applications
 e.g. used as storage backend for Android, AppEngine, Cloud
 based apps

 Storage for Computation
 e.g. BigQuery, Prediction API
Google Storage Benefits


             High Performance and Scalability
             Backed by Google infrastructure




               Strong Security and Privacy
               Control access to your data



           Easy to Use
           Get started fast with Google & 3rd party tools
Google Storage Technical Details

  RESTful API
    Verbs: GET, PUT, POST, HEAD, DELETE
    Resources: identified by URI
    Compatible with S3

  Buckets
     Flat containers

  Objects
     Any type
     Size: 100 GB / object

  Access Control for Google Accounts
     For individuals and groups
  Two Ways to Authenticate Requests
     Sign request using access keys
     Web browser login
Performance and Scalability


   Objects of any type and 100 GB / Object
   Unlimited numbers of objects, 1000s of buckets

   All data replicated to multiple US data centers
   Leveraging Google's worldwide network for data delivery

   Only you can use bucket names with your domain names
   Read-your-writes data consistency
   Range Get
Security and Privacy Features


   Key-based authentication
   Authenticated downloads from a web browser

   Sharing with individuals
   Group sharing via Google Groups

   Access control for buckets and objects
   Set Read/Write/List permissions
Demo


 Tools:
    GS Manager
    GSUtil

 Upload / Download
Google Storage usage within Google



            Google                        Google
           BigQuery                    Prediction API




                                Haiti Relief Imagery      USPTO data




                Partner Reporting     Partner Reporting
Some Early Google Storage Adopters
Google Storage - Pricing


     Storage
         $0.17/GB/Month

     Network
        Upload - $0.10/GB
        Download
           $0.15/GB Americas / EMEA
           $0.30/GB APAC

     Requests
        PUT, POST, LIST - $0.01 / 1000 Requests
        GET, HEAD - $0.01 / 10000 Requests
Google Storage - Availability


   Limited preview in US currently
      100GB free storage and network from Google per account
      Sign up for waitlist at http://code.google.com/apis/storage/

   Note: Non US preview available on case-by-case basis
Google Storage Summary


   Store any kind of data using Google's cloud infrastructure
   Easy to Use APIs

   Many available tools and libraries
     gsutil, GS Manager
     3rd party:
         Boto, CloudBerry, CyberDuck, JetS3t, and more
Google Prediction API
Google's prediction engine in the cloud
Introducing the Google Prediction API


   Google's sophisticated machine learning technology
   Available as an on-demand RESTful HTTP web service
How does it work?

                     "english" The quick brown fox jumped over the
The Prediction API             lazy dog.
finds relevant
                     "english" To err is human, but to really foul things
features in the                up you need a computer.
sample data during   "spanish" No hay mal que por bien no venga.
training.
                     "spanish" La tercera es la vencida.


The Prediction API
later searches for   ?          To be or not to be, that is the
                                question.
those features
                     ?          La fe mueve montañas.
during prediction.
A virtually endless number of applications...


 Customer    Transaction         Species           Message     Diagnostics
 Sentiment      Risk           Identification      Routing




  Churn      Legal Docket      Suspicious       Work Roster    Inappropriate
Prediction   Classification     Activity        Assignment        Content




Recommend      Political         Uplift             Email        Career
 Products       Bias            Marketing          Filtering   Counselling

                           ... and many more ...
A Prediction API Example
Automatically categorize and respond to emails by language


 Customer: ACME Corp, a multinational organization
 Goal: Respond to customer emails in their language
 Data: Many emails, tagged with their languages

 Outcome: Predict language and respond accordingly
Using the Prediction API
A simple three step process...


                                 Upload your training data to
              1. Upload          Google Storage




                                 Build a model from your data
              2. Train




              3. Predict         Make new predictions
Step 1: Upload
Upload your training data to Google Storage
Training data: outputs and input features
Data format: comma separated value format (CSV)

 "english","To err is human, but to really ..."
 "spanish","No hay mal que por bien no venga."
 ...
 Upload to Google Storage
 gsutil cp ${data} gs://yourbucket/${data}
Step 2: Train
Create a new model by training on data

To train a model:

POST prediction/v1.1/training?data=mybucket%2Fmydata

Training runs asynchronously. To see if it has finished:
GET prediction/v1.1/training/mybucket%2Fmydata

{"data":{
  "data":"mybucket/mydata",
  "modelinfo":"estimated accuracy: 0.xx"}}}
Step 3: Predict
   Apply the trained model to make predictions on new data
POST prediction/v1.1/query/mybucket%2Fmydata/predict
{ "data":{
   "input": { "text" : [
    "J'aime X! C'est le meilleur" ]}}}
Step 3: Predict
   Apply the trained model to make predictions on new data
POST prediction/v1.1/query/mybucket%2Fmydata/predict

{ "data":{
   "input": { "text" : [
    "J'aime X! C'est le meilleur" ]}}}

{ data : {
 "kind" : "prediction#output",
 "outputLabel":"French",
 "outputMulti" :[
   {"label":"French", "score": x.xx}
   {"label":"English", "score": x.xx}
   {"label":"Spanish", "score": x.xx}]}}
Step 3: Predict
   Apply the trained model to make predictions on new data

import httplib

header = {"Content-Type" : "application/json"}#...put new data in JSON
format in params variable
conn = httplib.HTTPConnection("www.googleapis.com")conn.request
("POST",
 "/prediction/v1.1/query/mybucket%2Fmydata/predict", params, header)
print conn.getresponse()
Prediction API Capabilities
Data
   Input Features: numeric or unstructured text
   Output: up to hundreds of discrete categories

Training
   Many machine learning techniques
   Automatically selected
   Performed asynchronously

Access from many platforms:
   Web app from Google App Engine
   Apps Script (e.g. from Google Spreadsheet)
   Desktop app
Prediction API v1.1 - new features


  Updated Syntax
  Multi-category prediction
     Tag entry with multiple labels
  Continuous Output
     Finer grained prediction rankings based on multiple labels
  Mixed Inputs
      Both numeric and text inputs are now supported

Can combine continuous output with mixed inputs
Google BigQuery
Interactive analysis of large datasets in Google's cloud
Introducing Google BigQuery


  Google's large data adhoc analysis technology
      Analyze massive amounts of data in seconds
  Simple SQL-like query language
  Flexible access
      REST APIs, JSON-RPC, Google Apps Script
Why BigQuery?
Working with large data is a challenge
Many Use Cases ...




    Interactive                                 Trends
                               Spam
       Tools                                   Detection




                     Web               Network
                  Dashboards          Optimization
Key Capabilities of BigQuery

  Scalable: Billions of rows
  Fast: Response in seconds

  Simple: Queries in SQL

  Web Service
    REST
    JSON-RPC
    Google App Scripts
Using BigQuery
Another simple three step process...


                                   Upload your raw data to
              1. Upload            Google Storage




                                   Import raw data into
              2. Import
                                   BigQuery table



              3. Query             Perform SQL queries on
                                   table
Writing Queries

Compact subset of SQL
     SELECT ... FROM ...
     WHERE ...
     GROUP BY ... ORDER BY ...
     LIMIT ...;

Common functions
    Math, String, Time, ...

Statistical approximations
        TOP
        COUNT DISTINCT
BigQuery via REST
GET /bigquery/v1/tables/{table name}

GET /bigquery/v1/query?q={query}
Sample JSON Reply:
{
    "results": {
      "fields": { [
       {"id":"COUNT(*)","type":"uint64"}, ... ]
      },
      "rows": [
       {"f":[{"v":"2949"}, ...]},
       {"f":[{"v":"5387"}, ...]}, ... ]
    }
}

Also supports JSON-RPC
Security and Privacy

Standard Google Authentication
   Client Login
   OAuth
   AuthSub

HTTPS support
  protects your credentials
  protects your data

Relies on Google Storage to manage access
Large Data Analysis Example
Wikimedia Revision History




Wikimedia Revision history data from: http://download.wikimedia.
org/enwiki/latest/enwiki-latest-pages-meta-history.xml.7z
Using BigQuery Shell
Python DB API 2.0 + B. Clapper's sqlcmd
http://www.clapper.org/software/python/sqlcmd/
BigQuery from a Spreadsheet
BigQuery from a Spreadsheet
Recap

  Google Storage
     High speed data storage on Google Cloud
  Prediction API
     Google's machine learning technology able to
     predict outcomes based on sample data
  BigQuery
     Interactive analysis of very large data sets
     Simple SQL query language access
Further info available at:

 Google Storage for Developers
    http://code.google.com/apis/storage
 Prediction API
    http://code.google.com/apis/prediction
 BigQuery
    http://code.google.com/apis/bigquery

More Related Content

PDF
Amazon S3 Best Practice and Tuning for Hadoop/Spark in the Cloud
PDF
Serverless Kafka and Spark in a Multi-Cloud Lakehouse Architecture
PPTX
A Deep Dive into Structured Streaming: Apache Spark Meetup at Bloomberg 2016
PPTX
Apache Spark MLlib
PPTX
ProxySQL for MySQL
PDF
Building an ML Platform with Ray and MLflow
PDF
Inside Kafka Streams—Monitoring Comcast’s Outside Plant
PPTX
Azure Logic Apps
Amazon S3 Best Practice and Tuning for Hadoop/Spark in the Cloud
Serverless Kafka and Spark in a Multi-Cloud Lakehouse Architecture
A Deep Dive into Structured Streaming: Apache Spark Meetup at Bloomberg 2016
Apache Spark MLlib
ProxySQL for MySQL
Building an ML Platform with Ray and MLflow
Inside Kafka Streams—Monitoring Comcast’s Outside Plant
Azure Logic Apps

What's hot (20)

PPTX
Apache Spark Components
PDF
Oracle GoldenGate and Apache Kafka A Deep Dive Into Real-Time Data Streaming
PDF
ksqlDB - Stream Processing simplified!
PPTX
Introduction to sqoop
PDF
Sub-Second SQL Search, Aggregations and Joins with Kafka and Rockset | Dhruba...
PDF
Apache Druid Auto Scale-out/in for Streaming Data Ingestion on Kubernetes
PPTX
Managing 2000 Node Cluster with Ambari
PDF
MariaDB: in-depth (hands on training in Seoul)
PDF
데브시스터즈 데이터 레이크 구축 이야기 : Data Lake architecture case study (박주홍 데이터 분석 및 인프라 팀...
PDF
멀티클라우드 Service Mesh
PDF
A Thorough Comparison of Delta Lake, Iceberg and Hudi
PDF
Porting a Streaming Pipeline from Scala to Rust
PDF
Apache Iceberg - A Table Format for Hige Analytic Datasets
PDF
천만 사용자를 위한 AWS 클라우드 아키텍처 진화하기 - 김준형 솔루션즈 아키텍트, AWS :: AWS Summit Seoul 2019
PDF
Migration From Oracle to PostgreSQL
PDF
Apache Spark on K8S Best Practice and Performance in the Cloud
PDF
The Apache Spark File Format Ecosystem
PDF
Get Mainframe Data to Snowflake’s Cloud Data Warehouse
PDF
Solving Enterprise Data Challenges with Apache Arrow
PDF
AWS 클라우드 데이터 이전을 위한 6가지 전략 (윤석찬) :: AWS 8월 월간 웨비나
Apache Spark Components
Oracle GoldenGate and Apache Kafka A Deep Dive Into Real-Time Data Streaming
ksqlDB - Stream Processing simplified!
Introduction to sqoop
Sub-Second SQL Search, Aggregations and Joins with Kafka and Rockset | Dhruba...
Apache Druid Auto Scale-out/in for Streaming Data Ingestion on Kubernetes
Managing 2000 Node Cluster with Ambari
MariaDB: in-depth (hands on training in Seoul)
데브시스터즈 데이터 레이크 구축 이야기 : Data Lake architecture case study (박주홍 데이터 분석 및 인프라 팀...
멀티클라우드 Service Mesh
A Thorough Comparison of Delta Lake, Iceberg and Hudi
Porting a Streaming Pipeline from Scala to Rust
Apache Iceberg - A Table Format for Hige Analytic Datasets
천만 사용자를 위한 AWS 클라우드 아키텍처 진화하기 - 김준형 솔루션즈 아키텍트, AWS :: AWS Summit Seoul 2019
Migration From Oracle to PostgreSQL
Apache Spark on K8S Best Practice and Performance in the Cloud
The Apache Spark File Format Ecosystem
Get Mainframe Data to Snowflake’s Cloud Data Warehouse
Solving Enterprise Data Challenges with Apache Arrow
AWS 클라우드 데이터 이전을 위한 6가지 전략 (윤석찬) :: AWS 8월 월간 웨비나
Ad

Viewers also liked (7)

PDF
An indepth look at Google BigQuery Architecture by Felipe Hoffa of Google
PPTX
Google Cloud Spanner Preview
PDF
AWS Athena vs. Google BigQuery for interactive SQL Queries
PDF
Redshift VS BigQuery
PDF
Google BigQuery for Everyday Developer
PDF
Google BigQuery
PDF
Google BigQuery - Features & Benefits
An indepth look at Google BigQuery Architecture by Felipe Hoffa of Google
Google Cloud Spanner Preview
AWS Athena vs. Google BigQuery for interactive SQL Queries
Redshift VS BigQuery
Google BigQuery for Everyday Developer
Google BigQuery
Google BigQuery - Features & Benefits
Ad

Similar to Intro to new Google cloud technologies: Google Storage, Prediction API, BigQuery (20)

PDF
Intro to Google's Cloud Technologies
PDF
Introduction to Google's Cloud Technologies
PDF
Building Apps on Google Cloud Technologies
PDF
Quick Intro to Google Cloud Technologies
PDF
Building Integrated Applications on Google's Cloud Technologies
PDF
Introduction to Google Cloud platform technologies
PDF
Building Integrated Applications on Google's Cloud Technologies
PPT
Google cloud platform
PDF
GDD Brazil 2010 - Google Storage, Bigquery and Prediction APIs
PDF
Google Developer Day 2010 Japan: Part 1: Google App Engine for Business の概要 P...
PPT
Computing at scale
PPTX
GDSC Cloud Jam.pptx
PDF
Google Cloud for Data Crunchers - Strata Conf 2011
PDF
Modern Thinking área digital MSKM 21/09/2017
PDF
Entrepreneurship Tips With HTML5 & App Engine Startup Weekend (June 2012)
PDF
Introduction to Google Cloud Platform Technologies
PDF
Big query
PDF
Mandy Waite, Warszawa marzec 2013
PDF
From zero to Google APIs: Beyond search & AI... leverage all of Google
PDF
A Tour of Google Cloud Platform
Intro to Google's Cloud Technologies
Introduction to Google's Cloud Technologies
Building Apps on Google Cloud Technologies
Quick Intro to Google Cloud Technologies
Building Integrated Applications on Google's Cloud Technologies
Introduction to Google Cloud platform technologies
Building Integrated Applications on Google's Cloud Technologies
Google cloud platform
GDD Brazil 2010 - Google Storage, Bigquery and Prediction APIs
Google Developer Day 2010 Japan: Part 1: Google App Engine for Business の概要 P...
Computing at scale
GDSC Cloud Jam.pptx
Google Cloud for Data Crunchers - Strata Conf 2011
Modern Thinking área digital MSKM 21/09/2017
Entrepreneurship Tips With HTML5 & App Engine Startup Weekend (June 2012)
Introduction to Google Cloud Platform Technologies
Big query
Mandy Waite, Warszawa marzec 2013
From zero to Google APIs: Beyond search & AI... leverage all of Google
A Tour of Google Cloud Platform

More from Chris Schalk (20)

PDF
Google App Engine Overview and Update
PDF
How to build Kick Ass Games in the Cloud
PDF
Building Kick Ass Video Games for the Cloud
PDF
GDD 2011 - How to build kick ass video games for the cloud
PDF
Google App Engine's Latest Features
PDF
Google App Engine's Latest Features
PDF
Building Multi-platform Video Games for the Cloud
PDF
Building Enterprise Applications on Google Cloud Platform Cloud Computing Exp...
PDF
Introduction to Google's Cloud Technologies
PDF
Javaedge 2010-cschalk
PDF
Google Cloud Technologies Overview
PDF
Introducing App Engine for Business
PDF
Google App Engine for Business 101
PDF
What's new in App Engine and intro to App Engine for Business
PDF
App Engine Presentation @ SFJUG Sep 2010
PDF
What is Google App Engine
PDF
App engine cloud_comp_expo_nyc
PDF
App engine devfest_mexico_10
PDF
App Engine Overview Cloud Futures Publish
PDF
App Engine Overview @ Google Hackathon SXSW 2010
Google App Engine Overview and Update
How to build Kick Ass Games in the Cloud
Building Kick Ass Video Games for the Cloud
GDD 2011 - How to build kick ass video games for the cloud
Google App Engine's Latest Features
Google App Engine's Latest Features
Building Multi-platform Video Games for the Cloud
Building Enterprise Applications on Google Cloud Platform Cloud Computing Exp...
Introduction to Google's Cloud Technologies
Javaedge 2010-cschalk
Google Cloud Technologies Overview
Introducing App Engine for Business
Google App Engine for Business 101
What's new in App Engine and intro to App Engine for Business
App Engine Presentation @ SFJUG Sep 2010
What is Google App Engine
App engine cloud_comp_expo_nyc
App engine devfest_mexico_10
App Engine Overview Cloud Futures Publish
App Engine Overview @ Google Hackathon SXSW 2010

Recently uploaded (20)

PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPTX
sap open course for s4hana steps from ECC to s4
PPTX
MYSQL Presentation for SQL database connectivity
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Encapsulation theory and applications.pdf
PDF
Approach and Philosophy of On baking technology
PPT
Teaching material agriculture food technology
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPTX
Spectroscopy.pptx food analysis technology
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
MIND Revenue Release Quarter 2 2025 Press Release
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
sap open course for s4hana steps from ECC to s4
MYSQL Presentation for SQL database connectivity
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
20250228 LYD VKU AI Blended-Learning.pptx
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
NewMind AI Weekly Chronicles - August'25 Week I
Encapsulation theory and applications.pdf
Approach and Philosophy of On baking technology
Teaching material agriculture food technology
Chapter 3 Spatial Domain Image Processing.pdf
Spectroscopy.pptx food analysis technology
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Diabetes mellitus diagnosis method based random forest with bat algorithm
The AUB Centre for AI in Media Proposal.docx
The Rise and Fall of 3GPP – Time for a Sabbatical?
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Mobile App Security Testing_ A Comprehensive Guide.pdf
MIND Revenue Release Quarter 2 2025 Press Release

Intro to new Google cloud technologies: Google Storage, Prediction API, BigQuery

  • 2. Introducción a las nuevas tecnologías de plataforma cloud de Google APIs de Almacenamiento, Predicción y BigQuery Chris Schalk Sept 23rd, 2010
  • 3. Agenda Google Storage for Developers Prediction API & BigQuery
  • 4. Google Storage for Developers Store your data in Google's cloud
  • 5. What Is Google Storage? Store your data in Google's cloud any format, any amount, any time You control access to your data private, shared, or public Access via Google APIs or 3rd party tools/libraries
  • 6. Sample Use Cases Static content hosting e.g. static html, images, music, video Backup and recovery e.g. personal data, business records Sharing e.g. share data with your customers Data storage for applications e.g. used as storage backend for Android, AppEngine, Cloud based apps Storage for Computation e.g. BigQuery, Prediction API
  • 7. Google Storage Benefits High Performance and Scalability Backed by Google infrastructure Strong Security and Privacy Control access to your data Easy to Use Get started fast with Google & 3rd party tools
  • 8. Google Storage Technical Details RESTful API Verbs: GET, PUT, POST, HEAD, DELETE Resources: identified by URI Compatible with S3 Buckets Flat containers Objects Any type Size: 100 GB / object Access Control for Google Accounts For individuals and groups Two Ways to Authenticate Requests Sign request using access keys Web browser login
  • 9. Performance and Scalability Objects of any type and 100 GB / Object Unlimited numbers of objects, 1000s of buckets All data replicated to multiple US data centers Leveraging Google's worldwide network for data delivery Only you can use bucket names with your domain names Read-your-writes data consistency Range Get
  • 10. Security and Privacy Features Key-based authentication Authenticated downloads from a web browser Sharing with individuals Group sharing via Google Groups Access control for buckets and objects Set Read/Write/List permissions
  • 11. Demo Tools: GS Manager GSUtil Upload / Download
  • 12. Google Storage usage within Google Google Google BigQuery Prediction API Haiti Relief Imagery USPTO data Partner Reporting Partner Reporting
  • 13. Some Early Google Storage Adopters
  • 14. Google Storage - Pricing Storage $0.17/GB/Month Network Upload - $0.10/GB Download $0.15/GB Americas / EMEA $0.30/GB APAC Requests PUT, POST, LIST - $0.01 / 1000 Requests GET, HEAD - $0.01 / 10000 Requests
  • 15. Google Storage - Availability Limited preview in US currently 100GB free storage and network from Google per account Sign up for waitlist at http://code.google.com/apis/storage/ Note: Non US preview available on case-by-case basis
  • 16. Google Storage Summary Store any kind of data using Google's cloud infrastructure Easy to Use APIs Many available tools and libraries gsutil, GS Manager 3rd party: Boto, CloudBerry, CyberDuck, JetS3t, and more
  • 17. Google Prediction API Google's prediction engine in the cloud
  • 18. Introducing the Google Prediction API Google's sophisticated machine learning technology Available as an on-demand RESTful HTTP web service
  • 19. How does it work? "english" The quick brown fox jumped over the The Prediction API lazy dog. finds relevant "english" To err is human, but to really foul things features in the up you need a computer. sample data during "spanish" No hay mal que por bien no venga. training. "spanish" La tercera es la vencida. The Prediction API later searches for ? To be or not to be, that is the question. those features ? La fe mueve montañas. during prediction.
  • 20. A virtually endless number of applications... Customer Transaction Species Message Diagnostics Sentiment Risk Identification Routing Churn Legal Docket Suspicious Work Roster Inappropriate Prediction Classification Activity Assignment Content Recommend Political Uplift Email Career Products Bias Marketing Filtering Counselling ... and many more ...
  • 21. A Prediction API Example Automatically categorize and respond to emails by language Customer: ACME Corp, a multinational organization Goal: Respond to customer emails in their language Data: Many emails, tagged with their languages Outcome: Predict language and respond accordingly
  • 22. Using the Prediction API A simple three step process... Upload your training data to 1. Upload Google Storage Build a model from your data 2. Train 3. Predict Make new predictions
  • 23. Step 1: Upload Upload your training data to Google Storage Training data: outputs and input features Data format: comma separated value format (CSV) "english","To err is human, but to really ..." "spanish","No hay mal que por bien no venga." ... Upload to Google Storage gsutil cp ${data} gs://yourbucket/${data}
  • 24. Step 2: Train Create a new model by training on data To train a model: POST prediction/v1.1/training?data=mybucket%2Fmydata Training runs asynchronously. To see if it has finished: GET prediction/v1.1/training/mybucket%2Fmydata {"data":{ "data":"mybucket/mydata", "modelinfo":"estimated accuracy: 0.xx"}}}
  • 25. Step 3: Predict Apply the trained model to make predictions on new data POST prediction/v1.1/query/mybucket%2Fmydata/predict { "data":{ "input": { "text" : [ "J'aime X! C'est le meilleur" ]}}}
  • 26. Step 3: Predict Apply the trained model to make predictions on new data POST prediction/v1.1/query/mybucket%2Fmydata/predict { "data":{ "input": { "text" : [ "J'aime X! C'est le meilleur" ]}}} { data : { "kind" : "prediction#output", "outputLabel":"French", "outputMulti" :[ {"label":"French", "score": x.xx} {"label":"English", "score": x.xx} {"label":"Spanish", "score": x.xx}]}}
  • 27. Step 3: Predict Apply the trained model to make predictions on new data import httplib header = {"Content-Type" : "application/json"}#...put new data in JSON format in params variable conn = httplib.HTTPConnection("www.googleapis.com")conn.request ("POST", "/prediction/v1.1/query/mybucket%2Fmydata/predict", params, header) print conn.getresponse()
  • 28. Prediction API Capabilities Data Input Features: numeric or unstructured text Output: up to hundreds of discrete categories Training Many machine learning techniques Automatically selected Performed asynchronously Access from many platforms: Web app from Google App Engine Apps Script (e.g. from Google Spreadsheet) Desktop app
  • 29. Prediction API v1.1 - new features Updated Syntax Multi-category prediction Tag entry with multiple labels Continuous Output Finer grained prediction rankings based on multiple labels Mixed Inputs Both numeric and text inputs are now supported Can combine continuous output with mixed inputs
  • 30. Google BigQuery Interactive analysis of large datasets in Google's cloud
  • 31. Introducing Google BigQuery Google's large data adhoc analysis technology Analyze massive amounts of data in seconds Simple SQL-like query language Flexible access REST APIs, JSON-RPC, Google Apps Script
  • 32. Why BigQuery? Working with large data is a challenge
  • 33. Many Use Cases ... Interactive Trends Spam Tools Detection Web Network Dashboards Optimization
  • 34. Key Capabilities of BigQuery Scalable: Billions of rows Fast: Response in seconds Simple: Queries in SQL Web Service REST JSON-RPC Google App Scripts
  • 35. Using BigQuery Another simple three step process... Upload your raw data to 1. Upload Google Storage Import raw data into 2. Import BigQuery table 3. Query Perform SQL queries on table
  • 36. Writing Queries Compact subset of SQL SELECT ... FROM ... WHERE ... GROUP BY ... ORDER BY ... LIMIT ...; Common functions Math, String, Time, ... Statistical approximations TOP COUNT DISTINCT
  • 37. BigQuery via REST GET /bigquery/v1/tables/{table name} GET /bigquery/v1/query?q={query} Sample JSON Reply: { "results": { "fields": { [ {"id":"COUNT(*)","type":"uint64"}, ... ] }, "rows": [ {"f":[{"v":"2949"}, ...]}, {"f":[{"v":"5387"}, ...]}, ... ] } } Also supports JSON-RPC
  • 38. Security and Privacy Standard Google Authentication Client Login OAuth AuthSub HTTPS support protects your credentials protects your data Relies on Google Storage to manage access
  • 39. Large Data Analysis Example Wikimedia Revision History Wikimedia Revision history data from: http://download.wikimedia. org/enwiki/latest/enwiki-latest-pages-meta-history.xml.7z
  • 40. Using BigQuery Shell Python DB API 2.0 + B. Clapper's sqlcmd http://www.clapper.org/software/python/sqlcmd/
  • 41. BigQuery from a Spreadsheet
  • 42. BigQuery from a Spreadsheet
  • 43. Recap Google Storage High speed data storage on Google Cloud Prediction API Google's machine learning technology able to predict outcomes based on sample data BigQuery Interactive analysis of very large data sets Simple SQL query language access
  • 44. Further info available at: Google Storage for Developers http://code.google.com/apis/storage Prediction API http://code.google.com/apis/prediction BigQuery http://code.google.com/apis/bigquery