Connect to an Amazon RedShift Data Source
You can connect TIBCO Data Science – Team Studio to an Amazon RedShift data source.
- Procedure
- Copy the RedShift driver to the following directories. and then change the ownership of these copies to the user who runs
TIBCO Data Science – Team Studio (usually user 'chorus').
- $CHORUS_HOME/shared/ALPINE_DATA_REPOSITORY/jdbc_driver/Public
- $CHORUS_HOME/shared/libraries
- Change the ownership of these copies to the user who runs
TIBCO Data Science – Team Studio.
Usually, that username is
'chorus'
. - Create a new redshift directory named $CHORUS_HOME/shared/ALPINE_DATA_REPOSITORY/jdbc/redshift.
- Copy the file driver.properties from the directory $CHORUS_HOME/shared/ALPINE_DATA_REPOSITORY/jdbc/default to the newly created redshift directory.
- Edit the contents of the file
$CHORUS_HOME/shared/ALPINE_DATA_REPOSITORY/jdbc/redshift/driver.properties as follows.
# Specify the JDBC class driver for the desired database type. # Examples: # Oracle = oracle.jdbc.driver.OracleDriver # Greenplum = org.postgresql.Driver # DB2 = com.ibm.db2.jcc.DB2Driver # Netezza = org.netezza.Driver # PostgreSQL = org.postgresql.Driver # SQLServer = com.microsoft.sqlserver.jdbc.SQLServerDriver # MySQL = com.mysql.jdbc.Driver # Teradata = com.teradata.jdbc.TeraDriver # Vertica = com.vertica.jdbc.Driver # Sybase = com.sybase.jdbc2.jdbc.SybDriver # Informix = com.informix.jdbc.IfxDriver # SAPDB = com.sap.dbtech.jdbc.DriverSapDB # InterBase = interbase.interclient.Driver # HSqlDB = org.hsqldb.jdbcDriver # MariaDB = org.mariadb.jdbc.Driver # MySQL = com.mysql.jdbc.Driver driverClass=com.amazon.redshift.jdbc41.Driver
- Locate and open for editing the file
additional_jdbc_drivers.rb.
The path is similar to path similar to /data/chorus/install/releases/5.9.1.0.3973-5d95f7c97/components/core/app/mixins/sequel/extensions/additional_jdbc_drivers.rb
- Add a line for the
redshift
class so that the content resembles the following.module Sequel module AdditionalJdbcDrivers MAP = { mariadb: ->(db) { org.mariadb.jdbc.Driver }, teradata: ->(db) { com.teradata.jdbc.TeraDriver }, vertica: ->(db) { com.vertica.jdbc.Driver }, hive2: ->(db) { org.apache.hive.jdbc.HiveDriver }, hive: ->(db) { org.apache.hadoop.hive.jdbc.HiveDriver }, redshift: ->(db) { com.amazon.redshift.jdbc41.Driver } } MAP.each do |key, driver| ::Sequel::JDBC::DATABASE_SETUP[key] = driver end end end
Important: You must apply this change to the file additional_jdbc_drivers.rb again after upgrading TIBCO Data Science – Team Studio. - Restart TIBCO Data Science – Team Studio.
- Open the
Add Data Source dialog.
- Provide the Data Source Type, the Data Source Name, and (optionally), the Description.
- Set the data connection (JDBC URL) using a URL similar to the following.
Tip: You can copy your RedShift URL from your AWS RedShift page
jdbc:redshift://armen-jjredshift.csyb6t8bifc8.us-west-1.redshift.amazonaws.com:5439/armenjjdb
- Select
Set database credentials as a shared account if you intend to allow all users to access the data source without using their own credentials.
Users access the database with your credentials as the data source owner. If you do not select this checkbox, each user must provide credentials for that data source to access it. You can check the box later if you change your mind.