Skip to contents

Wrapper to python function to upload a csv using Postgres Copy functionality

Usage

pyUploadCsv(connection, table, filepath, schema, disableConstraints = FALSE)

Arguments

connection

DatabaseConnector connection instance

table

Table in database

filepath

path to csv

schema

database schema containing table reference

disableConstraints

(not reccomended) disable constraints prior to upload to speed up process

Examples

if (FALSE) { # \dontrun{
connection <- DabaseConnector::connect(
  dbms = "postgreql",
  server = "myserver.com",
  port = 5432,
  password = "s",
  user = "me",
  database = "some_db"
)
ResultModelManager::pyUploadCsv(connection,
  table = "my_table",
  filepath = "my_massive_csv.csv",
  schema = "my_schema"
)
} # }