# NOT RUN {
# Define a new source from a DSN.
sqrlSource("daedalus", dsn = "Knossos")
# Define another source as a copy of the former.
sqrlSource(icarus = "daedalus")
# Redefine an existing source by a connection string.
# (This example is for a Windows-system client.)
sqrlSource("icarus",
driver = "PostgreSQL ANSI(x64)",
server = "localhost",
port = 5432,
uid = "asterion",
pwd = "moo")
# Define a new source by a connection string.
# (This example is for a GNU/Linux-system client,
# and employs the <pwd> password placeholder.)
sqrlSource("knossos",
"dbcname=Knossos;uid=theseus;pwd=<pwd>",
"driver=/opt/teradata/client/16.10/lib64/tdata.so")
# }
# NOT RUN {
# Define a new source from a configuration file.
sqrlSource(minos = "path/to/minos.config")
# Define a new source, ariadne, as a copy of the existing
# source, minos, then apply the configuration file conf.txt
# over that, and then set both the connection string and
# interface function name (parameter values) over those.
sqrlSource("ariadne",
copy = "minos",
config = "conf.txt",
connection = "DSN=Knossos",
interface = "a")
# Source names may conflict with those of preexisting
# R objects, provided that the config file defines a
# conflict-free name for the source's interface function.
sqrlSource("c", "path/to/", "c.config")
# }
# NOT RUN {
# Review defined sources.
sqrlSources()
# Remove two of the sources.
sqrlSource("remove", c("daedalus", "knossos"))
# Remove another.
sqrlSource(icarus = NULL)
# }
Run the code above in your browser using DataCamp Workspace