sqldb.conf

The configuration file used by data.aggregate.sqldb and data.newstation.sqldb. It is located in $DB/etc/$STATION/sqldb.$STATION.conf or in the default location $DB/etc/sqldb.conf. If the station specific file does not exist then the default one is used.

Format

Lines beginning with '#' are treated as comments. The format consists of a CSV separated list of key and value pairs. Keys are case insensitive. All lines have the string “$STATION” replaced with the lower case station code.

The valid keys are listed below.

DBServer

The hostname of the MYSQL server to connect to.

DBUser

The username on the MYSQL server.

DBPassword

The password for the MYSQL server.

TableBegin

Marks the start of the definition of a table to insert data into. Fields following the key are, in order, the external name, the database name, and the table name. A table is defined until the key “TableEnd” is received.

The following keys are valid within a table definition:

KeyType

The type of time data to key on. Currently only “hourly” is supported.

DBServer

Override the global server.

DBUser

Override the global user.

DBPassword

Override the global password.

Generator

The command to run to generate the data to process. The strings “$START”, “$END” and “$RECORDS” are replaced with their respective values before invoking the command.

Column

Define a data column to export into. The key fields are:

  1. The output column name.
  2. The output column format (this should be in MYSQL formatting, like 12.2 for twelve characters with two after the decimal).
  3. The MVC in the output table.

Any remaining fields are treated as possible input value sources. All input sources are averaged together to create the value written into the output table. Each input source consists of a variable name separated from an optional record with a “:” or “;”. All records defined by any variable are attempted to be loaded. The record is optional as long as the containing record for the variable is specified in at least on other variable.

TableEnd

End the table definition and return the the global scope.