sqrlConfig: Configuration Files

Description Example Configuration File Commentary on Example File See Also Examples

Description

This material does not describe a function, but (rather) the file format used to configure SQRL interfaces and RODBC communications.

Configuration files can be used to define new data sources, set blanket parameter values for existing sources, or set individually named parameter values.

Example Configuration File

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# Parameters for RODBC:odbcConnect/RODBC:odbcDriverConnect.
dsn                 =
uid                 = stanislaus
pwd                 = D:/some/other/file.txt
connection          = "driver=<driver>;dbalias=quag;uid=<uid>;pwd=<pwd>;"
case                = "nochange"
believeNRows        = TRUE
colQuote            = c("`", "'")
tabQuote            = "
interpretDot        = TRUE
DBMSencoding        = ""
rows_at_time        = 100
readOnlyOptimize    = FALSE

# Additional parameters for RODBC:sqlQuery.
errors              = TRUE
as.is               = TRUE
max                 = 0
buffsize            = 1000
nullstring          = NA_character_
na.strings          = c("NA", "-", "")
dec                 = .
stringsAsFactors    = FALSE

# Parameters for SQRL.
driver              = "{IBM DB2 ODBC DRIVER}"
interface           = "Q"
ping                = "select 1 from dual"
verbose             = FALSE
visible             = TRUE
prompt              = "Q"
wintitle            = "(Quag)"

Commentary on Example File

This is a sample configuration file, exhibiting all parameters. In general, a file need not include all of these (default values are in place).

Parameters may be defined as the path to some other file. The driver and dsn parameters will take paths as their values. For all other parameters, a value will be read from within the file. Such files may contain only a single line with only the one parameter value on it, or they may adhere to the full (multiple) ‘parameter = value’ format. Unexpected results may occur should a file called (say) “TRUE” exist.

File paths should not be wrapped in quotes. Other strings may be wrapped, although this is not mandatory unless they clash with the name of an object within the R base namespace.

When the right hand side of the equals is left blank, no action is taken (the parameter on the left hand side is not assigned to).

See Also

sqrlParams, sqrlSource, sqrlUsage, RODBC

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
# Define a new source (not from file).
sqrlSource("Orac", "Dbq=Delphi;Uid=Pythia;Pwd=<pwd>",
            "Driver={Oracle in OraClient11g_home1}")

# Review the current configuration (parameter values).
Orac("config")

## Not run: 
# Configure an existing source from file.
Orac("config", "my/config/file")

# Set one named parameter from file.
Orac(connection = "my/other/file")

# Define and configure a new source from file.
sqrlSource("Zen", "my/other/" "file")

## End(Not run)

SQRL documentation built on Oct. 12, 2018, 9:05 a.m.