tosql
Usage:
omode=tosql protocol=<jdbc-protocol> host=<value> db=<db-name> dbtable=<table-name> write=create|dropcreate|append user=<username> password=<passwd>
Writes a new table to an SQL database.
You need the appropriate JDBC drivers and
-Djdbc.drivers
set as usual
(see Section 3.4).
Additional parameters for this output mode are:
protocol = <jdbc-protocol>
(String)
mysql
,
and for PostgreSQL's driver it is postgresql
.
For other drivers, you may have to consult the driver
documentation.
host = <value>
(String)
[Default: localhost
]
db = <db-name>
(String)
The value of this parameter forms the last part
of the JDBC connection URL.
That means that for some JDBC drivers,
you can append parameter specifications to it
to affect the way the connection is made to the database, e.g.
"db=some_db?useSSL=false
"
for MySQL's Connector/J.
dbtable = <table-name>
(String)
write = create|dropcreate|append
(WriteMode)
create
: Creates a new table before writing. It is an error if a table of the same name already exists.dropcreate
: Creates a new database table before writing. If a table of the same name already exists, it is dropped first.append
: Appends to an existing table. An error results if the named table has the wrong structure (number or types of columns) for the data being written.[Default: create
]
user = <username>
(String)
[Default: mbt
]
password = <passwd>
(String)