Write To Database Table

write_table(file, data, con)

Arguments

file

filepath of data being written

data

data to be written to the database

con

variable, connection to the Postgres database

Value

Writes the data to the database

Details

This is a helper function to check if the table exists, if not it creates the table and writes to it. If the table exists, it overwrites existing data.