RBigQuery-package: BigQuery for R

Description Overview Note Author(s) See Also

Description

A DBI extension for querying and parsing results from Google's BigQuery database.

Overview

  1. Connect and authenticate with Google:

    conn <- dbConnect(BigQuery(), username="[email protected]",
                      password="pass")
            
  2. Get table fields:

    info <- dbListFields(conn, "bigquery/samples/shakespeare")
            
  3. Send a query and if successful get results as data.frame:

    result <- dbSendQuery(conn, "SELECT word FROM 
        [bigquery/samples/shakespeare] WHERE word CONTAINS 'raisin'")
    if ([email protected])
        fetch(result)
    else
        dbGetInfo(result, "error")
            
  4. Get information about connection, results, etc.:

    summary(BigQuery(), verbose=TRUE)
    summary(conn, verbose=TRUE)
    summary(result, verbose=TRUE)
    dbGetException(conn)
            

Note

This package does not yet support data import or table deletion.

Author(s)

David Xiao <[email protected]>

See Also

dbDriver dbConnect dbDisconnect dbSendQuery dbGetQuery fetch dbClearResult summary dbGetInfo dbColumnInfo dbGetException dbGetStatement


RBigQuery documentation built on May 31, 2017, 2:55 a.m.