read_scripts: Read SQL scripts from a directory

Description Usage Arguments Details Value

View source: R/cee_connect.R

Description

Read SQL scripts from a directory into R for use against a database.

Usage

1
read_scripts(base_path, sqlvars, prefix, pattern)

Arguments

base_path

the directory holding the sql files

sqlvars

a list containing all variables you wish to set within your queries

prefix

a prefix from your SQL filenames if you want to remove before creating the data frames

pattern

a suffix to include in the data frame names

Details

Just place all scripts in the same directory with a .sql extension, and provide the directory path. It's also possible to set any variables in your query with the format of $variable.

Value

sql.list returns a list of SQL queries with the future filename as the name


brascoball/hattyr documentation built on Sept. 16, 2017, 4:29 a.m.