User Tools

Site Tools


newdevs:code:import_csv_into_db

This is an old revision of the document!


Import Data from a CSV file into database tables

The Concerto database isn't very large, and sometimes you need to test things with more data. If you can pull and anonymize production-level data (but not too much to crash your test server), you can copy it into place with a CSV file.

1. Log into the database as the root user.

2. Create a placeholder schema for your project.

CREATE SCHEMA tlittle;

3. Create a placeholder table for your data to start in, and name the columns–including their datatype–for your table.

create table tlittle.acqprolist 
(name text, owner integer, currency_type text, code text, active boolean, prepayment_required boolean, default_copy_count integer);
newdevs/code/import_csv_into_db.1677521313.txt.gz · Last modified: 2023/02/27 13:08 by tlittle

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki

© 2008-2022 GPLS and others. Evergreen is open source software, freely licensed under GNU GPLv2 or later.
The Evergreen Project is a U.S. 501(c)3 non-profit organization.