# NOT RUN {
# Define a new data source, named 'entropy'.
sqrlSource("entropy", uid = "ludwig", pwd = "<pwd>",
driver = "{SQL Server Native Client 11.0}",
server = "Clausius", database = "Gibbs")
# The source comes with an interface of the same name.
sqrlInterface("entropy")
entropy("sources")
# Change the name of the interface function.
sqrlInterface("entropy", "S")
# The name of the source remains unchanged.
sqrlInterface("entropy")
S("sources")
# }
# NOT RUN {
# Submit a query, via the interface.
S("select 1")
# Submit a script, via the interface.
S("My/SQL/file.sql")
# Submit a parameterised script, via the interface.
S("My/SQRL/file.sqrl", month = "April")
# }
# NOT RUN {
# Remove the source's interface function.
sqrlInterface("entropy", "remove")
# The source remains, but has no interface.
sqrlInterface("entropy")
sqrlSources()
# }
Run the code above in your browser using DataLab