Configuring the AsterDB package

For TIBCO Spotfire® Data Function developers to be able to use the TERR AsterDB package, you must follow the installation and configuration steps to make it available to the TERR engine on Spotfire Statistics Services, and to deploy it to use with Spotfire Data Functions.

Procedure

  1. Run TERR engine console as administrator.
    In the Spotfire Statistics Services installation, you can find the engine in TSSS_HOME/engines/Terr/bin directory. Right-click TERR.exe and select Run as administrator.

    (The function install.packages() must write to the TERR installation directory, and if TERR is installed under C:\Program Files, administrator access is required.)

  2. From within the TERR console, download and install the package from the Spotfire Statistics Services repository by running the following function:
    1. install.packages("AsterDB", repos="http://yourserver:port#/service_name/update/TERR").
    2. Quit the TERR console by typing q() at the command prompt.
  3. Browse to the Teradata® Web site, and then locate and download the Aster JDBC driver ("noarch-aster-jdbc-driver.jar").
  4. Copy this driver to TSSS_HOME/engines/Terr/library/AsterDB/java.
  5. Make sure JAVA_HOME is set (for example, C:\Program Files\Java\jdk-11.0.9). (AsterDB requires the terrJava package, which requires this environment variable to be set.)
  6. Run the TERR engine console again, and then load the package:
    library(AsterDB).
    You should see the following:

  7. Test that the library loaded successfully using the TERR command prompt, type ?aster.connect.
    A browser window should open and display the help topic for this AsterDB function.
  8. Configure your database settings.
    1. In TERR, call the function encryptString("AsterDatabasePassword") where AsterDatabasePassword is the unencrypted password to your Aster database.
      The encrypted string for this password is returned.
    2. Copy this encrypted string to your clipboard.
    3. Browse to the TSSS_HOME/engines/Terr/library/AsterDB directory, and using a text editor, open and edit the file DatabaseConfig.dcf.
      1. Set the alias property to the value data function developers should use to refer to this database configuration from the first argument of the TERR function aster.connect(). (Be sure to give this alias to the data function developers writing code to call that function.)
      2. Set the password property value by pasting the encrypted password you copied.
      Note: You can specify multiple Aster databases in this configuration file by copying and pasting the entire block (separated by a blank line), specifying a unique alias for each, and supplying the appropriate encrypted password for each.
    See the Aster Database documentation for more information.
  9. Test the AsterDB package by repeating steps 6 and 7, using one of the examples in the help file for aster.connect() .
  10. Now that you have the AsterDB package configured correctly, you can deploy it to a Spotfire Statistics Services cluster, and you can deploy it to your Spotfire servers, to be distributed to Spotfire Analyst users. See the TERR Package Management documentation for detailed information about performing these tasks.