Menu

Configuration

Holzhauer

Setting up a Database Outputter Action

A Database outputter action is configured similar to a file outputter
action. After you configured one or more data sets, in the scenario
tree, right-click on “Outputters” and choose “Add DB Outputter”. The
wizard’s first step page (figure 1) appears:

  • Data Properties

    • Name: Choose an arbitrary name for the outputter action that
      itentifies the outputter in the sceanrio tree.

    • Data Set ID: Use the drop-down menu to choose a previously
      configured data set.

  • Table Columns

    • Add run ID: This is important for batch runs. In case it is
      activated the plugin adds a column “runID” to each data row. The
      highest runID will be queried from the table and increased. In
      case of a new table it start with 1.

    • **Run-Info Table Name: ** Specify the name of the table that
      contains run information. This is used to assign unique run IDs.
      However, if there is another DB-Outputter used before in a
      particular run, the corresponding run-info table name is used.
      Furthermore, if there is an earlier call to that run-info table
      is used.

    • Move the columns that shall be stored in DB to the left.

  • Data Base Properties

    • Table name: Type in the name of the table the data shall be
      stored in. NOTE: If the table does not exist, the plugin tries
      to create a new table.
  • Caching Settings

    • Specify the number of outputs that are cached before the data is
      sent to the database. This can save an enormous amount of time
      since a single database query could be very time consuming.
      Every object per tick counts. I.e., if the data set is defined
      to gather data from 5 agents every second tick, data will be
      passed to the database after 20 ticks when the number of outputs
      to cache is 50. Note that the interval of data storage is
      defined during the configuration of the data sets.

Screenshot thumbnail
Wizard Step 2
Screenshot thumbnail
Wizard Step 1
Screenshot thumbnail
Wizard Step 3 (RS 2.0.1)
Screenshot thumbnail
Wizard Step 2 (RS 2.0.1)
Screenshot thumbnail
Wizard Step 1 (RS 2.0.1)

The second wizard step (figure 2) deals with database
connection properties:

  • Database Connection Properties

    • **URL: ** State the URL of the database you want to connect to,
      e.g. . This text field features auto completion.

    • **Driver: ** Specify the JDBC driver class according to your
      database, for instance . Make sure that the driver is available
      at the classpath. The MySQL Connector-J library containing the
      driver may be downloaded from\
      http://www.mysql.com/downloads/connector/j/. This text field
      features auto completion.

  • Database User Properties

    • **User: ** The username to connect with.

    • **Password: ** Specify the password to log on at the database if
      there are no security concerns since passwords are stored in
      clear text in the outputter deciption XML file within the model
      configuration folder (*.rs). If there are concers, uncheck to
      following box.

    • **Store Login Details: ** If it is checked username and password
      will be stored in clear text to the configuration file. If the
      box is unchecked, input fields for username and password are
      disabled. Furthermore, the ``Test DB Connection"-Button is
      diabled since it is not possible to check the connection without
      username and password. However, it is possible to check the box,
      fill in username and password, check the connection, and uncheck
      the box to prevent storing login data. When no username and
      password are given, the plugin prompts for login data when the
      simulations is initialised. Then, also a connection test is
      performed (figure 2).

    • **Test DB Connection-Button: ** Press the button to test a
      connection to the MySQL-Database with given parameters. If the
      test fails, a dialog (figure 2) appears and gives
      the opportunity to correct the data. If the test passes, the
      newly entered data is passed to the second wizard step.


Related

Wiki: Home

MongoDB Logo MongoDB