This guide explains how to install and configure the Elastic Marts Builder portlet and its utilities.

Prerequisites

  • Teradata Viewpoint 13.0.0.2 or later running on Linux
  • Teradata Database
  • Bteq

Step 1 - Download ElasticMartsBuilder.zip package

Download ElasticMartsBuilder.zip.

Step 2 - Extract the zip file

Extract the zip file to /<your-install-path>/elasticMartsBuilder/.

Run the following command:

cd <your-install-path>
unzip ElasticMartsBuilder.zip

The contents of the extracted zip file should look like:

/<your-install-path>/elasticMartsBuilder/Documentation/Elastic Marts Builder - User Guide.pdf
/<your-install-path>/elasticMartsBuilder/Portlets/DataUploadPortlet.war
/<your-install-path>/elasticMartsBuilder/Portlets/DownloadServletManager.war
/<your-install-path>/elasticMartsBuilder/Properties/sandbox.properties
/<your-install-path>/elasticMartsBuilder/Properties/.elasticmartsbuilderprofile
/<your-install-path>/elasticMartsBuilder/Scripts/DB_Sandbox_Install.bteq

Step 3 - Configure the database installation script

The parameters in the database installation script need to be modified to your database system settings. Open the DB_Sandbox_Install.bteq script and modify the parameters. Note: You must configure the values that are marked required.

Step 3a - Specify Database System & Admin User Login

Specify the admin user (i.e. DBC) used to create the Elastic Marts Builder database structure and maintenance tables. Note: The admin user must have the following two permissions:

  • CREATE USER permission ON target_owner_DB (i.e. the DB that will own the Elastic Marts Builder objects to be created
  • CREATE ROLE WITH GRANT OPTION.

Replace DBS_Name with the name of the target DB system. This value is found in the BTEQ file (Step 1). Replace super_user and super_user_password with the correct login/password of the admin user that will be used to create the database structure. This value is found in the BTEQ file (Step 1).

Step 3b - Create Admin User

Create the Elastic Marts Builder Admin account. This admin user will house the maintenance tables and Elastic Marts that are to be created. This admin user should get assigned enough PERM space to store the created elastic marts as well as any maintenance tables/objects required by the admin user.

  • Change the owning database. All of the elastic marts and maintenance tables will be created under this database. By default, the user's owner will be DBC. However, this value can be changed to any other database with enough PERM space. Modify this line: FROM DBC AS and replace DBC with the name of the new database/user. This value is found in the BTEQ file (Step 2).
  • Change the PERM space. By default, the PERM space allocated is 932GB, but this can be changed depending on your system. Modify this line: PERM = 1001000000000 and replace with the desired PERM value (in bytes). This value is found in the BTEQ file (Step 2).

Step 3c - Create database to house Elastic Marts

This step creates the database that will house the elastic marts. The database resides under the Elastic Marts Builder Admin account.

  • Change the PERM space. This database should get the majority of the PERM space assigned to the Admin account. If the default PERM value was changed in Step 3b, then you should also change this value. Modify this line: PERM = 1000000000000 and replace with the desired PERM value (in bytes). This value must be less than the value specified in Step 3b. This value is found in the BTEQ file (Step 3).

Step 3d - Grant permissions on public databases/tables to the default role

This step grants permissions on any databases/tables that all elastic marts will have access to. For security reasons, this should be limited to SELECT permissions.

  • Uncomment the series of GRANT statements and change each one as needed. Make sure to replace the <public_database_name1> lines with the actual database/object names. Also, make sure to leave the role name unchanged in the GRANT statement. This value is found in the BTEQ file (Step 9).

Step 4 - Run the database installation script

You must have Bteq installed on your machine to run the installation script. Change directories to where the bteq script DB_Sandbox_Install.bteq is extracted. Copy/paste this command:

bteq < DB_Sandbox_Install.bteq > output.txt

The output of the script will be stored in a text file called output.txt.

Step 5 - Configure and install the properties file

The properties file is located in this path: <your-install-path>/elasticMartsBuilder/Properties/sandbox.properties

Step 5a - Modify properties file

Open the sandbox.properties file and modify it with the correct values. See the table below for field descriptions and required fields.

 

Field Name Description Required Comments
dbssandbox.commons.db.netlog Teradata database server name Yes Replace <db_server_name> with the correct value.
dbssandbox.commons.db.classforname Teradata jdbc driver class for name   Default: com.teradata.jdbc.TeraDriver
dbssandbox.commons.db.jdbc.url Teradata jdbc connection URL Yes Replace <db_server_name> with the correct value.
dbssandbox.commons.db.admin Database user with rights to create the parent database Yes Replace <db_admin_user> with the correct value.
dbssandbox.commons.db.password Password for the user defined above Yes Replace <db_admin_password> with the correct value.
dbssandbox.commons.db.encoding Encoding type   Default: utf8
dbssandbox.commons.db.upload.dir Temporary files system for upload functionality Yes Replace <server_upload_dir> with the correct value.  Directories must be created in advance and terminated with a forward slash "/".
dbssandbox.commons.db.download.dir Temporary files system for download functionality Yes Replace <server_download_dir> with the correct value. Directories must be created in advance and terminated with a forward-slash "/".
dbssandbox.commons.server.name Viewpoint Portal server name or ip address of the Viewpoint Portal is deployed Yes Replace <viewpoint_server_name> with the correct value.
dbssandbox.commons.server.port HTTP port where Viewpoint Portal is running   Default: 80
dbssandbox.commons.mail.server Server mail relay Yes Replace <smtp_server_name> with the correct value.
dbssandbox.commons.mail.port Server mail relay port   Default: 25
dbssandbox.commons.mail.from Email address for from which e-mails will be sent Yes Replace <user_name>@<company_name> with the correct value.
dbssandbox.commons.mail.from.userid E-mail user account from which e-mails will be sent Yes Replace <user_name> with the correct value.
dbssandbox.portlets.maxpermlimit Default permanent space limit for sandbox user db in bytes   Default: 1073741824 (1GB)
dbssandbox.commons.mail.from.password Password for the e-mail user account Yes Replace <user_name_password> with the correct value.
dbssandbox.commons.mailmanager.switch Turns email on/off   Default: on
dbssandbox.portlets.uploadsizelimit Default size limit for file uploads in bytes   Default: 26214400 (25MB)

Step 5b - Copy properties file to final location

Once you are done modifying the sandbox.properties file, copy it to $CATALINA_HOME/bin using the command below:

cp sandbox.properties $CATALINA_HOME/bin

Step 6 - Install the Portlet WAR files

Change directory to /<your-install-path>/elasticMartsBuilder/Portlets. Copy the two portlet war files to the Viewpoint portlet deployment directory using the commands below:

cp DataUploadPortlet.war $CATALINA_HOME/viewpoint-working/liferay-autodeploy
cp DownloadServletManager.war $CATALINA_HOME/webapps

Once the war files are placed in this file system location, Viewpoint will automatically deploy them. This may take a minute or two.

Step 7 - Configure the Elastic Marts Nightly Maintenance Script

The nightly maintenance script will send an e-mail to owners of expiring elastic marts asking to renew or delete their mart. The script will also delete all expired elastic marts. The script also cleans out the upload/download directories and removes temporary files.

Step 7a - Create Symbolic link

Create a symbolic link to $CATALINA_HOME/bin in order for script to correctly identify the location of the sandbox.properties file. To do so run the follow commands:

mkdir \-p /var/opt/teradata
ln \-s $CATALINA_HOME/bin /var/opt/teradata/elastic_mart_builder

Step 7b - Modify the .elasticmartsbuilderprofile file

Edit the .elasticmartsbuilderprofile file located in: /<your-install-path>/elasticMartsBuilder/Properties/

Change <replace-with-your-viewpoint-server-location> with the actual location of your Viewpoint server. Typically it would be /var/opt/teradata/viewpoint.

(Optional - Set JAVA_HOME location)

If your machine has multiple Java versions installed, you will need to point the nightly maintenance script to use JDK 1.5 (if that is not already the default).

Add the following line to the top of .elasticmartsbuilderprofile:

export JAVA_HOME = <your-jdk1.5-install-location>

Step 7c - Configure the cron job to run nightly.

This will drop expired sandboxes and clean up the temporary files on the system.

00 00 * * * source /<your-install-path>/elasticMartsBuilder/Properties/.elasticmartsbuilderprofile;ls -l;java com.teradata.dbsandbox.commons.sandboxapi.admin.DBSandboxAdminDriver > /root/output.txt
  1. Type "crontab -e"
  2. Add the following line to the crontab (make sure to change <your-install-path> to the actual location of the previously extracted elaticMartsBuilder.zip file):

You should now be ready to use the Elastic Marts Builder portlet.

Discussion
Janardhan 2 comments Joined 04/10
15 May 2010

whe I tried to create user through the elastic builder portlet, it gives the error "not enough space available" .
I'm selecting only minimum space of 100 mb and I cant see space errors in the dbqlogs. I can't see any error messages in te system ... any help is appreciated

dfu 8 comments Joined 09/09
17 May 2010

The errors will probably be located in the Tomcat logs under viewpoint\logs.

IanPemberton 2 comments Joined 11/09
29 Jul 2010

We ran into the following 2 problems when trying to use this portlet:
1. The Elastic Marts Builder Admin account had been created so the password needed changing on first logon.
2. The create database command first of all checks various dbc tables which were not granted to the Elastic Marts Builder Admin account. This resulted in the "not enough space available" which was less than helpful.

In order to solve the above problems we enabled query logging so that we could see the SQL being generated as this was not present in the logs. Can the developers please make sure the SQL is written to the logs.

ct185020 1 comment Joined 05/09
24 Sep 2010

Our TD TPA system is on Linux Suse. Can Teradata Viewpoint 13 reside on this TPA node? or needs other system??

dfu 8 comments Joined 09/09
24 Sep 2010

Since Viewpoint has its own system requirements, I would recommend installing it on a separate system.

helge 14 comments Joined 02/08
22 Nov 2010

I've just deployed version 1.01 of Elastic Marts Builder, with viewpoint 13.10, and I can't get passed the "not enough space available".
What did you have to do to get passed it? I've tried to grant select access to dbc to the admin-account, to no help this far...

helge 14 comments Joined 02/08
23 Nov 2010

For those it may concern:
I finaly figured out that the confusing error-message "not enough space available" is shown whatever caused the "spacecheck" to fail. In my case, I had put the wrong name for database in the sandbox.properties file, so the spacecheck couldn't even find the database server...
This I found in the catalina.out logfile....

You must sign in to leave a comment.