The “Firebird External Table Generator” or ext-table-gen is a commandline tool to convert RFC 4180 CSV files and CSV files with custom formats to Firebird external tables (a binary format for Firebird external table data).
External tables are a good way for bulk-loading data into Firebird. Unfortunately, external tables use a fixed-width binary format[1], and not a (more) standard format like CSV. It is not always easy to create an appropriate external table file, and this is where ext-table-gen can be used.
At a high level, ext-table-gen provides the following features:
-
Derive a
CHAR
-based external table definition (i.e. aCREATE TABLE
statement and a configuration for ext-table-gen) from a CSV file -
Transform a CSV file to an external table file (either based on the CSV file itself, or based on a configuration file)
By default, ext-table-gen derives tables with only CHAR
columns.
This makes the generated file essentially a fixed-width text format.
However, you can modify the configuration file to make ext-table-gen generate columns of different types, in which case the file becomes a binary format.
ext-table-gen supports the following types of columns:
-
String types:
-
char
-
-
Integral number types:
-
smallint
-
integer
-
bigint
-
int128
-
-
Exact numeric types (fixed point):
-
numeric
-
decimal
-
-
Datetime types:
-
date
-
time
(without time zone) -
timestamp
(without time zone)
-
The project is hosted on GitHub: https://github.com/mrotteveel/ext-table-gen.
Documentation of the latest tagged release can be found on: https://mrotteveel.github.io/ext-table-gen/
SPDX-License-Identifier: Apache-2.0