Next Previous Up Contents
Next: Table Formats
Up: Table I/O
Previous: Table I/O

5.1 Table Locations

The location of tables for input and output are usually given using the in and out parameters respectively. These are often, but not always, filenames. The possibilities are these:

Filename
Very often, you will simply specify a filename as location, and the tool will just read from/write to it in the usual way.
URL
Tables can be read from URLs directly, and in some cases written to them as well. Some non-standard URL protocols are supported as well as the usual ones. The list is:
http:
Read from HTTP resources.
ftp:
Read from anonymous FTP resources.
file:
Read from local files. This is not particularly useful since you can do much the same using just the filename. There is a difference: using this form forces reads to be sequential rather than random access, which may allow you to experience a different set of different performance characteristics and bugs.
jar:
Specialised protocol for looking inside Java Archive files - see JarURLConnection documentation.
myspace:
Accesses files in the AstroGrid "MySpace" virtual file store. These URLs look something like "myspace:/survey/iras_psc.xml", and can access files in the myspace are that the user is currently logged into. These URLs can be used for both input and output of tables. To use them you must have an AstroGrid account and the AstroGrid WorkBench or similar must be running; if you're not currently logged in a dialogue will pop up to ask you for name and password.
ivo:
Understands ivo-type URLs which signify files in the AstroGrid "MySpace" virtual file store. These URLs look something like "ivo://uk.ac.le.star/filemanager#node-2583". These URLs can be used for both input and output of tables. To use them you must have an AstroGrid account and the AstroGrid WorkBench or similar must be running; if you're not currently logged in a dialogue will pop up to ask you for name and password.
jdbc:
Used for communicating with SQL-compliant relational databases. These are a bit different to normal URLs - see section Section 3.4.
Minus sign ("-")
The special location "-" (minus sign) indicates standard input (for reading) or standard output (for writing). This allows you to use STILTS commands in a normal Unix pipeline.
System command ("<syscmd" or "syscmd|)
If the location starts with a "<" character or ends with a "|" character, the rest of the string is taken as a command line to be executed by the system shell. For instance a location like "<cat header.txt data.txt" (or equivalently "cat header.txt data.txt|") could be used to prepend a header line to an ASCII data file before it is passed to the STILTS ASCII-format input handler. Note this syntax will probably only work on Unix-like systems.

In any of these cases, for input locations compression is taken care of automatically. That means that you can give the filename or URL of a file which is compressed using gzip, bzip2 or Unix compress and the program will uncompress it on the fly.


Next Previous Up Contents
Next: Table Formats
Up: Table I/O
Previous: Table I/O

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