Description Usage Arguments Details Methods (by class) See Also Examples
Exports results from a Redshift SQL query, and returns the id of the file on S3 for use
with read_civis
or download_civis
.
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 | query_civis_file(x, ...)
## S3 method for class 'character'
query_civis_file(
x,
database = NULL,
job_name = NULL,
hidden = TRUE,
verbose = verbose,
csv_settings = NULL,
...
)
## S3 method for class 'sql'
query_civis_file(
x,
database = NULL,
job_name = NULL,
hidden = TRUE,
verbose = FALSE,
csv_settings = NULL,
...
)
## S3 method for class 'numeric'
query_civis_file(x, database = NULL, verbose = FALSE, ...)
|
x |
"schema.table", |
... |
Options passed to |
database |
string, Name of database where data frame is to be uploaded.
If no database is specified, uses |
job_name |
string, Name of the job (default: |
hidden |
bool, Whether the job is hidden. |
verbose |
bool, Set to TRUE to print intermediate progress indicators. |
csv_settings |
See |
By default, the export uses the default csv_settings in scripts_post_sql
,
which is a gzipped csv.
character
: Export a "schema.table"
to a file id.
sql
: Export results of a query to a file id.
numeric
: Run an existing sql script and return the file id of the results on S3.
Other io:
download_civis()
,
query_civis()
,
read_civis()
,
write_civis_file()
,
write_civis()
1 2 3 4 5 6 7 8 9 10 11 12 | ## Not run:
id <- query_civis_file("schema.tablename", database = "my_database")
df <- read_civis(id, using = read.csv)
query <- sql("SELECT * FROM table JOIN other_table USING id WHERE var1 < 23")
id <- query_civis_file(query)
df <- read_civis(id, using = read.csv)
id <- query_civis_file(query_id, credential_id = 0000)
df <- read_civis(id, using = read.csv)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.