-
Notifications
You must be signed in to change notification settings - Fork 185
/
Copy pathapi-dataset.Rd
79 lines (62 loc) · 2.31 KB
/
api-dataset.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/bq-dataset.R
\name{api-dataset}
\alias{api-dataset}
\alias{bq_dataset_create}
\alias{bq_dataset_meta}
\alias{bq_dataset_exists}
\alias{bq_dataset_update}
\alias{bq_dataset_delete}
\alias{bq_dataset_tables}
\title{BigQuery datasets}
\usage{
bq_dataset_create(x, location = "US", ...)
bq_dataset_meta(x, fields = NULL)
bq_dataset_exists(x)
bq_dataset_update(x, ...)
bq_dataset_delete(x, delete_contents = FALSE)
bq_dataset_tables(x, page_size = 50, max_pages = Inf, warn = TRUE, ...)
}
\arguments{
\item{x}{A \link{bq_dataset}}
\item{location}{Dataset location}
\item{...}{Additional arguments passed on to the underlying API call.
snake_case names are automatically converted to camelCase.}
\item{fields}{An optional field specification for
\href{https://cloud.google.com/bigquery/docs/api-performance#partial-response}{partial response}}
\item{delete_contents}{If \code{TRUE}, will recursively delete all tables in
the dataset. Set to \code{FALSE} by default for safety.}
\item{page_size}{Number of items per page.}
\item{max_pages}{Maximum number of pages to retrieve. Use \code{Inf} to retrieve
all pages (this may take a long time!)}
\item{warn}{If \code{TRUE}, warn when there are unretrieved pages.}
}
\description{
Basic create-read-update-delete verbs for datasets.
}
\section{Google BigQuery API documentation}{
\itemize{
\item \href{https://cloud.google.com/bigquery/docs/reference/rest/v2/datasets/get}{get}
\item \href{https://cloud.google.com/bigquery/docs/reference/rest/v2/datasets/insert}{insert}
\item \href{https://cloud.google.com/bigquery/docs/reference/rest/v2/datasets/delete}{delete}
\item \href{https://cloud.google.com/bigquery/docs/reference/rest/v2/tables/list}{list}
}
}
\examples{
\dontshow{if (bq_testable()) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf}
ds <- bq_dataset(bq_test_project(), "dataset_api")
bq_dataset_exists(ds)
bq_dataset_create(ds)
bq_dataset_exists(ds)
str(bq_dataset_meta(ds))
bq_dataset_delete(ds)
bq_dataset_exists(ds)
# Use bq_test_dataset() to create a temporary dataset that will
# be automatically deleted
ds <- bq_test_dataset()
bq_table_create(bq_table(ds, "x1"))
bq_table_create(bq_table(ds, "x2"))
bq_table_create(bq_table(ds, "x3"))
bq_dataset_tables(ds)
\dontshow{\}) # examplesIf}
}