Dbexport
Appends data to an existing table in an external database.
Usage
dbexport (data, connect-string, tablename : )
Details
Stores data to the table identified by tablename in
the database reachable through connect-string, in a schema
accessible by user via password. If the table already
exists, its contents will be destroyed and replaced by data.
Notes
- Connect strings are strings that obey the format
jdbc_str!username!password
where jdbc_str is a typical JDBC connection string (URL),
username is a valid username for the data source, and
password is the associated password for that user.
- The Theseus.properties file must contain the name of the driver
being used (e.g., sun.jdbc.odbc.JdbcOdbcDriver) assigned to the
operators/jdbc/driver variable.
Known Bugs
Example
Using the input:
RELATION books: title char, author char, pages number
Title1|Author1|34
Title2|Author2|479
Title3|Author2|733
Title4|Author3|32
Title5|Author2|1152
when executing the plan:
PLAN test
{
INPUT: stream books
OUTPUT:
BODY
{
dbexport (books, "jdbc:oracle:thin:@mydb!scott!tiger", "book" : )
}
}
will write the data to the database table specified (destroying
the contents of any previous table, if it exists).