Next Previous Up Contents
Next: Crossmatching
Up: Table Pipelines
Previous: Specifying a list of columns
This section lists the output modes which can be used as
the value of the omode
parameter of
tpipe
and other commands.
Typically, having produced a result table by pipeline processing
an input one, you will write it out by specifying
omode=out
(or not using the omode
parameter at all -
out
is the default). However, you can do other things
such as calculate statistics, display metadata, etc. In some of
these cases, additional parameters are required. The different
output modes are listed below.
-
mode=count
-
Counts the number of rows and columns and writes the result to standard output.
-
mode=meta
-
Prints the table metadata to standard output.
The name and type etc of each column is tabulated,
and table parameters are also shown.
-
mode=out
-
Writes a new table.
Additional parameters for this output mode are:
-
out = <out-table>
- The location of the output table. This is usually a filename
to write to.
If it is equal to the special value "-" (the default)
the output table will be written to standard output.
[Default:
-
]
-
ofmt = <out-format>
- Specifies the format in which the output table will be written
(one of the ones in Section 4.2 - matching is
case-insensitive and you can use just the first few letters).
If it has the special value
"
(auto)
"
(the default),
then the output filename will be
examined to try to guess what sort of file is required
usually by looking at the extension.
If it's not obvious from the filename what output format is
intended, an error will result.
[Default: (auto)
]
-
mode=stats
-
Calculates and displays univariate statistics for each
of the numeric columns in the table.
Mean, standard deviation, minimum, maximum and number of
good rows are shown.
-
mode=topcat
-
Displays the output table directly in
TOPCAT.
If a TOPCAT instance (version 1.6 or later) is already
running on the local host, the table will be opened in
that, otherwise a new TOPCAT instance will be launched
for display.
The latter mode only works if the TOPCAT classes are
on the class path.
There are currently limits to the size of table
that can be transmitted to the application in this way -
it is hoped that this can be improved in a future
release.
-
mode=tosql
-
Writes a new table to an SQL database.
You need the appropriate JDBC drivers and
-Djdcb.drivers
set as usual
(see Section 3.4).
Additional parameters for this output mode are:
-
protocol = <jdbc-protocol>
- 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 postgres
.
For other drivers, you may have to consult the driver
documentation.
-
host = <value>
- The host which is acting as a database server.
[Default:
localhost
]
-
database = <db-name>
- The name of the database on the server into which the
new table will be written.
-
newtable = <table-name>
- The name of the new table which will be written to the
database.
If a table by this name already exists, it may be overwritten.
-
user = <username>
- User name for the SQL connection to the database.
[Default:
mbt
]
-
password = <passwd>
- Password for the SQL connection to the database.
Next Previous Up Contents
Next: Crossmatching
Up: Table Pipelines
Previous: Specifying a list of columns
STILTS - Starlink Tables Infrastructure Library Tool Set
Starlink User Note
256
STILTS web page:
http://www.starlink.ac.uk/stilts/
Author email:
m.b.taylor@bristol.ac.uk