-
Notifications
You must be signed in to change notification settings - Fork 180
/
list_tabledata.Rd
66 lines (53 loc) · 2.07 KB
/
list_tabledata.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tabledata.r
\name{list_tabledata}
\alias{list_tabledata}
\alias{list_tabledata_callback}
\alias{list_tabledata_iter}
\title{Retrieve data from a table.}
\usage{
list_tabledata(project, dataset, table, page_size = 10000,
table_info = NULL, max_pages = 10, warn = TRUE,
quiet = getOption("bigrquery.quiet"))
list_tabledata_callback(project, dataset, table, callback, table_info = NULL,
page_size = getOption("bigrquery.page.size"), max_pages = 10,
warn = TRUE, quiet = getOption("bigrquery.quiet"))
list_tabledata_iter(project, dataset, table, table_info = NULL)
}
\arguments{
\item{project}{project containing this table}
\item{dataset}{dataset containing this table}
\item{table}{name of the table}
\item{page_size}{Number of items per page.}
\item{table_info}{if known, the table information retrieved with
\code{\link{get_table}}}
\item{max_pages}{maximum number of pages to retrieve. Use \code{Inf}
to retrieve the complete dataset.}
\item{warn}{If \code{TRUE}, warn when there are rows remaining to
be pulled down from database.}
\item{quiet}{if \code{FALSE}, prints informative status messages.}
\item{callback}{function called with single argument, the data from the
current page of data}
}
\description{
\code{list_tabledata} returns a single dataframe.
\code{list_tabledata_callback} calls the supplied callback with each page
of data.
\code{list_tabledata_iter} returns a named list with functions \code{next_}
(fetches one chunk of rows), \code{next_paged} (fetches arbitrarily many
rows using a specified page size), \code{is_complete} (checks if all rows
have been fetched), \code{get_schema} (returns the schema of the table),
and \code{get_rows_fetched} (returns the number of rows already fetched).
}
\examples{
\dontrun{
billing_project <- "341409650721" # put your project number here
natal <- list_tabledata("publicdata", "samples", "natality", max_pages = 2,
page_size = 10)
dim(natal)
}
}
\seealso{
API documentation at
\url{https://developers.google.com/bigquery/docs/reference/v2/tabledata/list}
}