Next Previous Up Contents
Next: Crossmatching
Up: Output Modes
Previous: topcat

6.4.11 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)
The driver-specific sub-protocol specifier for the JDBC connection. For MySQL's Connector/J driver, this is mysql, and for PostgreSQL's driver it is postgresql. For other drivers, you may have to consult the driver documentation.
host = <value>       (String)
The host which is acting as a database server.

[Default: localhost]

db = <db-name>       (String)
The name of the database on the server into which the new table will be written.

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)
The name of the table which will be written to the database.
write = create|dropcreate|append       (WriteMode)
Controls how the values are written to a table in the database. The options are:

[Default: create]

user = <username>       (String)
User name for the SQL connection to the database.

[Default: mbt]

password = <passwd>       (String)
Password for the SQL connection to the database.


Next Previous Up Contents
Next: Crossmatching
Up: Output Modes
Previous: topcat

STILTS - Starlink Tables Infrastructure Library Tool Set
Starlink User Note256
STILTS web page: http://www.starlink.ac.uk/stilts/
Author email: m.b.taylor@bristol.ac.uk
Mailing list: topcat-user@jiscmail.ac.uk