-
Notifications
You must be signed in to change notification settings - Fork 22
Expand file tree
/
Copy pathbqr_query.Rd
More file actions
58 lines (48 loc) · 1.63 KB
/
bqr_query.Rd
File metadata and controls
58 lines (48 loc) · 1.63 KB
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
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/query.R
\name{bqr_query}
\alias{bqr_query}
\title{Query a BigQuery Table}
\usage{
bqr_query(
projectId = bqr_get_global_project(),
datasetId = bqr_get_global_dataset(),
query,
labels = list(),
maxResults = 1000,
useLegacySql = TRUE,
useQueryCache = TRUE,
dryRun = FALSE,
timeoutMs = 600 * 1000
)
}
\arguments{
\item{projectId}{The BigQuery project ID}
\item{datasetId}{A datasetId within projectId}
\item{query}{BigQuery SQL. You can also supply a file location of your query ending with \code{.sql}}
\item{labels}{Labels to tag to job in list format. lower-case only. Default empty list}
\item{maxResults}{Max number per page of results. Set total rows with LIMIT in your query.}
\item{useLegacySql}{Whether the query you pass is legacy SQL or not. Default TRUE}
\item{useQueryCache}{Whether to use the query cache. Default TRUE, set to FALSE for realtime queries.}
}
\value{
a data.frame.
If there is an SQL error, a data.frame with
additional class "bigQueryR_query_error" and the
problem in the data.frame$message
}
\description{
MaxResults is how many results to return per page of results, which can be less than the
total results you have set in your query using LIMIT. Google recommends for bigger datasets
to set maxResults = 1000, but this will use more API calls.
}
\examples{
\dontrun{
bqr_query("big-query-r","samples",
"SELECT COUNT(repository.url) FROM [publicdata:samples.github_nested]")
}
}
\seealso{
\href{https://cloud.google.com/bigquery/sql-reference/}{BigQuery SQL reference}
}
\concept{BigQuery query functions}