Description Arguments Value Author(s)
Given a SQL query, this functions inserts it's results onto a redshift table. We can choose to clean the existing table records before inserting or to simply append. If the table does not exist, one will be automatically created. The yaml file must contain host, dbname, user and password.
query |
Character vector with length 1. Can be either a SQL query or a path to a text file containing a SQL query. |
tableName |
The name of the redshift table to create or append to. Will be transformed to lower case. |
schema |
Character vector with length 1 with the name of the DB schema were the table will be created. |
keyColumn |
Optional. A character string or a character vector with the name of a column/columns to be used as sort keys in the newly created table. If nothing is specified, the table is created without sort keys. |
clean |
Boolean indicating whether or not to remove existing records from the table before inserting. |
id |
The name of the yaml group containing the database credentials. |
yamlFile |
The path to the yaml file. |
The function will return a boolean value indicating if the process completed successfully.
João Monteiro and Daniela Cunha
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.