m4_get_from_table: Simple generic SELECT * wrapper for extracting data from base...

Description Usage Arguments Value Examples

View source: R/m4_base.R

Description

Function to perform a basic SELECT * from the noted table projected down by the optional where clause.

Usage

1
m4_get_from_table(con, table, where = NULL)

Arguments

con

A bigrquery::bigquery() DBIConnection object, as returned by DBI::dbConnect() with an appropriate bigrquery::bigquery() DBI driver specified in the call.

table

a character string representing a valid MIMIC-IV table name.

where

an optional character string representing a SQL WHERE clause.

Value

a tibble with the results.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# To run examples, you must have the BIGQUERY_TEST_PROJECT environment
# variable set to name of project which has billing set up and to which
# you have write access.
con <- bigrquery::dbConnect(
  bigrquery::bigquery(),
  project = bigrquery::bq_test_project(),
  quiet = TRUE
)

m4_get_from_table(con, "d_items", where = "where itemid <= 220048")

bigrquery::dbDisconnect(con)

hdshea/MIMIC4db documentation built on Dec. 20, 2021, 3:45 p.m.