get_column_info: Describe column of table in the DBMS

Description Usage Arguments Value Column information of the DBMS table Examples

Description

The get_column_info() retrieves the column information of the DBMS table through the tbl_bdi object of dplyr.

Usage

1

Arguments

df

a tbl_dbi.

Value

An object of data.frame.

Column information of the DBMS table

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
library(dplyr)
# connect DBMS
con_sqlite <- DBI::dbConnect(RSQLite::SQLite(), ":memory:")

# copy heartfailure to the DBMS with a table named TB_HEARTFAILURE
copy_to(con_sqlite, heartfailure, name = "TB_HEARTFAILURE", overwrite = TRUE)

con_sqlite %>% 
  tbl("TB_HEARTFAILURE") %>% 
  get_column_info
  
# Disconnect DBMS   
DBI::dbDisconnect(con_sqlite)

bit2r/kodlookr documentation built on Dec. 19, 2021, 9:49 a.m.