Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 18 Next »


Introduction

Google provides BigQuery for querying massive datasets by enabling super-fast SQL queries against append-only tables using the processing power of Googles's infrastructure. Users can move their data into BigQuery and let it to handle the hard work. 

 

Now CDAP provides the interface for users to handle their datasets in BigQuery. 

 

Use-case

Users want to integrate CDAP with their already stored dataset in Google BigQuery. 

 

User Stories

  1. As a user, I would like to run arbitrary queries synchronously against my datasets in BigQuery and pull those records in BigQuery and pull those records in a hydrator pipeline.

  2. As a user, i would like to store data from a Hydrator pipeline into a table (dataset) in BigQuery. If the table doesn't exist, it should be created.

 

Requirements

  1. User should specify the limit time for the querying. 

  2. User is able to specify the limit size of the dataset to query. 

  3. The schema is automatically pulled from the table. 

  4. User can pull the field names from the query.

 

Example

Following is a simple example showing how BigQuery Source would work.

A dataset already exist in Google BigQuery:121

project Id: vernal-seasdf-123456

dataset name: baby_names

namecount
Emma100
Oscar334
Peter223
Jay1123
Nicolas764

 

User pull the schema of the dataset:

InputsValue
project Id vernal-seasdf-123456
dataset namebaby_names

output schema:

SchemaTypeRequiredDescription
nameStringYesnames of baby born in 2014
countIntegerYesthe number of occurrences of the name

 

User run query agains dataset in BigQuery and pull the records:

InputsValue
project Id vernal-seasdf-123456
querySELECT name, count FROM baby_names ORDER BY count DESC LIMIT 3

 

output:

namecount
Jay1123
Nicolas764
Oscar334

 

Design

CDAP provides two type of operations on the dataset stored in BigQuery: Query and Poll Results. 

Users can use Query operation to do SQL query on specified dataset in BigQuery.

For Poll Results, user can fetch the result using specified job ID or fetch the a specified number of latest query results. 

Query:

 

Inputstyperequireddefault
ProjectIdStringYes

 

CredencialStringYes 
QueryStringYes 
Limit TimeInteger (min)No10
Limit SizeInteger (GB)No50

 

Poll Results:

Using jobId:

InputstypeRequired
PorjectIdStringYes
JobIdStringYes

 

Polling Latest Results:

InputsTypeRequired
ProjectIdStringYes
Poll NumerIntegerYes

 



 

 

 

  • No labels