credbl | R Documentation |
get_credentials
– retrive credentials
get_mssql_driver
– retrive driver
mj
– format mongodb query
date_to_mongo
– convert date to mongodb format
# connecting to a Microsoft SQL database with the ODBC driver
# read server settings
dbconfig <- read_yaml("database_info.yaml")
# get driver
dbconfig <- get_mssql_driver(dbconfig)
# get credentials
credentials <- get_credentials(dbconfig$server)
connection <- DBI::dbConnect(
odbc(),
driver=dbconfig$driver,
server=dbconfig$server,
port=dbconfig$port,
uid=credentials$uid,
pwd=credentials$pwd,
# database='mydatabase'
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.