get_views: Create *ALL* materialized views from the set available on the...

Description Usage Arguments Details Value Author(s) Examples

Description

Create *ALL* materialized views from the set available on the MIMIC code repository This function creates a materialized view from those available on the MIMIC code repository. See details about where these come from.

Usage

1
2
get_views(URLlist = "london2016_datathon_cirr/mat_view_urls", con, dplyrDB,
  special = FALSE, specialURL = "")

Arguments

URLlist

a character string URL to the location of a plaintext file containing a list of all SQL files to create the views

con

your postgres DBI object to connect to the postgres db

dplyrDB

your dplyr database source (Currently must be postgres).

special

binary indicated whether to do the special case materialized views which require some additional care. Defaults to fall

specialURL

a character string URL to the locate of a XML file containing the special handling instructions.

Details

TBD

Value

a list containing all the remote processed views.

Author(s)

Jesse D. Raffa

Examples

1
2
3
4
5
6
7
## Setup Connection
# m <- dbDriver("PostgreSQL")
# passwd <- "secret";
# con <- dbConnect(m, user="user", password=passwd, dbname="mimic",host="localhost",port=5674) # The trickiest part
# dbSendStatement(con,"SET search_path to mimiciii"); # or whatever schema you have
# pg_src <- src_postgres(dbname = "mimic", host = "127.0.0.1", port = 5674, user = "user", password = passwd,options="-c search_path=mimiciii")
# myViews <- get_views("https://raw.githubusercontent.com/MIT-LCP/mimic-code/master/concepts/code-status.sql",dbSource=pg_src,conn=con)

jraffa/MIMICutil documentation built on May 6, 2019, 7:32 a.m.