Query the database

Share:

Description

Sends a query to the BigQuery database and returns a BQResult object describing it.

Arguments

statement

character string of query. See BigQuery query reference for syntax

status

(Optional) flag to print status messages about the state of execution - recommended

verbose

(Optional) flag to print all debugging information during the query - do not set unless you know what you're doing

Methods

signature(conn = "BQConnection", statement = "character"), ...

Returns a BQResult. Use fetch() to retrieve full results.

See Also

BQConnection-class BQResult-class dbGetQuery-methods fetch-methods dbReadTable-methods dbGetInfo-methods

Examples

1
2
3
4
5
6
7
 ## Not run: 
    conn <- dbConnect(driver, "username", "password")
    result <- dbSendQuery(conn, "SELECT word FROM [bigquery/samples/shakespeare]
                                 WHERE word CONTAINS 'raisin'", status=TRUE)
    data <- fetch(result)

## End(Not run)