getSQL: Reads a SQL query from a file

Description Usage Arguments Details Value

View source: R/tools.R

Description

This function is intended to read a long and complex SQL query from a file, where it could be edited in a SQL editor, that can then be submitted as a postgreSQL query.

Usage

1
getSQL(filepath)

Arguments

filepath

The filepath of the SQL file.

Details

This function is based on code obtained from: https://stackoverflow.com/questions/44853322/how-to-read-the-contents-of-an-sql-file-into-an-r-script-to-run-a-query?noredirect=1&lq=1.

Value

A formatted sql query as a string.


station-demand-forecasting-tool/sdft documentation built on July 11, 2021, 4:23 a.m.