query_civis: Run a Query on Platform

Description Usage Arguments Methods (by class) See Also Examples

View source: R/io.R

Description

Utility to run queries that return no output.

A default database can be set using options(civis.default_db = "my_database"). If there is only one database available, this database will automatically be used as the default.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
query_civis(x, ...)

## S3 method for class 'sql'
query_civis(x, database = NULL, verbose = FALSE, ...)

## S3 method for class 'numeric'
query_civis(x, verbose = FALSE, ...)

## S3 method for class 'character'
query_civis(x, database = NULL, verbose = FALSE, ...)

Arguments

x

sql("..."), "query", or id of an existing sql script.

...

arguments passed to queries_post.

database

string, Name of database where query is run.

verbose

bool, Print detailed updates of job status.

Methods (by class)

See Also

read_civis for downloading results of SQL scripts from Civis Platform as a data frame.

io

Other io: download_civis(), query_civis_file(), read_civis(), write_civis_file(), write_civis()

Examples

1
2
3
4
## Not run: 
query_civis("GRANT ALL ON schema.my_table TO GROUP admin", "database", credential=0000)

## End(Not run)

civisanalytics/civis-r documentation built on June 27, 2020, 7:25 a.m.