How to Load and Manage CSV Files using DbSchema
Connection Dialog
A CSV (comma-separated values) file is a text file that has a specific format which allows data to be saved in a table structured format.
DbSchema can simultaneously load and manage multiple CSV files placed inside a folder.
In the DbSchema connection dialog choose the folder where the CSV files are.
The connection dialog is explained here.
CSV Formats
DEFAULT | Standard Comma Separated Value format, similar to RFC4180 but allows empty lines. |
EXCEL | The Microsoft Excel CSV format. |
INFORMIX_UNLOAD | Informix UNLOAD format used by the UNLOAD TO file_name operation. |
INFORMIX_UNLOAD_CSV | Informix CSV UNLOAD format used by the UNLOAD TO file_name operation (escaping is disabled). |
MONGO_CSV | MongoDB CSV format used by the mongoexport operation. |
MONGO_TSV | MongoDB TSV format used by the mongoexport operation. |
MYSQL | The MySQL CSV format. |
ORACLE | Default Oracle format used by the SQL*Loader utility. |
POSTGRESQL_CSV | Default PostgreSQL CSV format used by the COPY operation. |
POSTGRESQL_TEXT | Default PostgreSQL text format used by the COPY operation. |
RFC4180 | The RFC-4180 format defined by RFC-4180. |
TDF | A tab-delimited format. |
Here with a more detailed description
Format Name | Delimiter | Ignore Empty Lines | Quote Character | Comment Marker | Record Separator |
DEFAULT | , | No | " | # | \r\n |
EXCEL | , | No | " | None | \r\n |
INFORMIX_UNLOAD | ` | ` | No | None | None |
INFORMIX_UNLOAD_CSV | , | No | " | None | \n |
MONGO_CSV | , | No | " | None | \r\n |
MONGO_TSV | \t | No | " | None | \r\n |
MYSQL | \t | No | " | None | \n |
ORACLE | , | No | " | None | \n |
POSTGRESQL_CSV | , | No | " | None | \n |
POSTGRESQL_TEXT | \t | No | None | None | \n |
RFC4180 | , | No | " | None | \r\n |
TDF | \t | No | " | None | \n |
Save the Database Back to CSV
After connecting, DbSchema will load the data into a H2 local database.
You can edit the data, add new records, etc.
To save back the data to CSV file use the command:
save csv to 'path'
where the path is the folder where to save the data.
DbSchema Features for CSV Files
DbSchema is loading the CSV files to a temporary H2 database.
DbSchema will auto-detect the mandatory fields, primary keys and foreign keys.
Available are all DbSchema features, including the SQL Editor, Relational Data Explorer, Query Builder, etc.