Description Usage Arguments Value Author(s) See Also Examples
Connects to postgresSQL database and runs the query given in the specified file. Also, stores the results in a .RDS file in the same location as the sqlFilePath (or in RDSpath) Possible enhancements : Option to not store as RDS
1 2 3 4 5 6 7 8 9 10 11 |
sqlFilePath |
Location of the Sql file |
RDSpath |
Alternate path to store the RDS file, else RDS will be stored in the same location as the sqlFilePath. If readFromRds, the RDS will be read from this location |
readFromRds |
Looks for the .Rds file in the same path as sqlFilePath |
bkpExisting |
Backup the existing RDS file |
username |
database user name, if not provided will be prompted |
password |
database passowrd, if not provided will be prompted |
dbname |
database name |
host |
database host name |
port |
database port |
data.table
Amit Agni
Other database functions:
runSQLinText()
1 | runPostgreSQL_inFile(sqlFileName = here("SQL_get-dates.sql"),user = "",password="",readFromRds = F,dbname = "dw",host = "dwserver", port = 5050)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.