Skip to content
This repository was archived by the owner on Oct 14, 2025. It is now read-only.

Commit 2766bcb

Browse files
authored
Merge pull request #23 from stemangiola/fix-20
Fix 20
2 parents 6bfd0b5 + 4cf6770 commit 2766bcb

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

dev/metadata_database.R

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
1+
library(RSQLite)
2+
library(DBI)
3+
library(dplyr)
4+
15
args <- commandArgs(trailingOnly = TRUE)
26
# Path to the metadata file used as input
37
metadata_input <- args[[1]]
48
# Path to the sqlite file which this script will output
5-
output_file <- args[[1]]
9+
output_file <- args[[2]]
610

711
metadata <- readRDS(metadata_input)
812

9-
con <- DBI::dbConnect(RSQLite::SQLite(), dbname=output_file) |>
10-
dplyr::copy_to(metadata, "metadata")
13+
con <- dbConnect(SQLite(), dbname=output_file)
14+
dbWriteTable(con, "metadata", metadata)
15+
dbDisconnect(con)

0 commit comments

Comments
 (0)