[bd22c4]: / src / db_queries / db_queries.R

Download this file

23 lines (13 with data), 576 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
##### Code from: eda/KAO/01_KAO_Establishing_connection_to_db_extracting_timeStamp #####
##### Accessing time stamp of raw files #####
library(DBI)
library(RSQLite)
#### Establish connection to SQLite db #####
con <- dbConnect(RSQLite::SQLite(), dbname = "P:/All_20200428_COVID_plasma_multiomics/SQLite Database/Covid-19 Study DB.sqlite")
#### List tables in db #####
dbGetInfo(con)
dbListTables(con)
dbReadTable(con, "rawfiles")
#### Fetch raw file time stamp for GC files ####
timeStamp <- dbGetQuery(con, "SELECT * FROM rawfiles WHERE ome_id=3")
dbDisconnect(con)