This R package, tsql.documentation
, utilizes the MS SQL metadata to compile, via knitter, a comprehensive and easily navigable documentation deliverable for database deployments.
Building clean and concise data definition documentation over and over again is mind-numbing, especially since everything that is needed is [usually] stored in the inherent metadata. I needed a way to pull all this together and build a PDF (with navigation), WITHOUT the need of an over priced documentation tool.
The two required packages, rmarkdown
and RODBC
- both of which are installing when this library is loaded. However, since the result renders a PDF file via pandoc
, you need to manually install LaTeX, i.e. MikTeX. Additionally, for ease of installation, devtools
is recommended.
Using the devtools
function, install with the below:
install_github('mjfii/TSQL-Documentation')
library('tsql.documentation')
To open a connection (note: only integrated security is available):
cnn <- get.connection('<server_name>','<database_name>')
To load a data frame with markdown:
cnn <- get.connection('<server_name>','<database_name>')
md <- get.markdown(cnn)
To write full documentation to disk:
cnn <- get.connection('<server_name>','<database_name>')
doc <- get.documentation(cnn, 'c:/' , 'documentation.pdf')
Michael Flanigan email: mick.flanigan@gmail.com twitter: @mjfii
0.0.0.9000 - Initial deployment (2017-01-26)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.