Skip to content

Moving data from csss‐site db to csss‐site‐backend

Gabe edited this page Dec 30, 2024 · 4 revisions

Since we're moving data between different schemas, I believe the easiest way to do this is store table data as a csv file, then parse it & load it into the new database using a python script.

We start by using the following sql command to move details from a specific table to a csv file

COPY (SELECT * from public.about_officer) TO '/tmp/about_officers.csv' WITH CSV DELIMITER ',' HEADER;

Next, ...

Clone this wiki locally