R: A bigquery data source.

src_bigquery {bigrquery} | R Documentation

## A bigquery data source.

### Description

Use `src_bigquery` to connect to an existing bigquery dataset, and `tbl` to connect to tables within that database.

### Usage

    src_bigquery(project, dataset, billing = project, max_pages = 10)

### Arguments

`project` | project id or name
`dataset` | dataset name
`billing` | billing project, if different to `project`
`max_pages` | (IGNORED) max pages returned by a query

### Examples

    ## Not run:
    library(dplyr)

    # To run this example, replace billing with the id of one of your projects
    # set up for billing
    con <- DBI::dbConnect(dbi_driver(),
      project = "publicdata",
      dataset = "samples",
      billing = "887175176791"
    )

    DBI::dbListTables(con)
    DBI::dbGetQuery(con, "SELECT * FROM gsod LIMIT 5")

    # You can also use the dplyr interface
    shakespeare <- con %>% tbl("shakespeare")
    shakespeare
    shakespeare %>%
      group_by(word) %>%
      summarise(n = sum(word_count)) %>%
      arrange(desc(n))

    ## End(Not run)

[Package bigrquery version 0.4.1 Index]