Description Usage Arguments Value Examples
View source: R/redshift_query.R
redshift_query
returns the output of a SQL query on one of the FT
Redshift clusters. You must be connected to the FT internal network to use
this function. If you are commiting code to github, do not write your
redshift user name and password into the file. Instead create a .Renviron
file in your home directory and access the credentials via
Sys.getEnv()
(see examples).
1 | redshift_query(sql_file, cluster, username, password, from_file = TRUE)
|
sql_file |
File name (and path) of a .sql you would like to run. |
cluster |
The name of the cluster on which the query should run. Use 'int' for the INT cluster and 'analytics' for the Analytics cluster. |
username |
Your Redshift username. |
password |
Your Redshift passowrd. |
from_file |
Is the sql_file field a file to be ready or a query as a string? To pass a query string set to FALSE. |
A dataframe of the query output.
1 2 3 4 | ## Not run:
redshift_query("my_query.sql","int",Sys.getEnv("redshift_username"),Sys.getEnv("redshift_password"))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.