Configure and Register Data Gateway for Reporting

Perform these optional steps to enable remote connectivity for Classic features such as analyses and dashboards.

If you're only deploying for data visualization (for example, Oracle Analytics Cloud Professional Edition), then you don't need to follow these steps.
Before you start, follow the configuration steps in Configure Data Gateway for Data Visualization.
  1. On the machine where you've installed a Data Gateway agent, obtain the machine name and port number.
    In a server deployment:
    1. Execute the command /<Data Gateway install folder>/domain/bin/status.sh.
    2. In the command output, note the machine name contained within the URL displayed under Data Gateway Status, and note the Data Gateway Jetty HTTP Port value.
    In a personal deployment:
    1. Open the file: %localappdata%\Temp\DataGateway\ports.properties.
    2. Note the machine name and port number.
  2. Start the Data Gateway agent.
  3. If you want to edit your semantic model before you start connecting to your data remotely, use Model Administration Tool to load the Java data source metadata.
    1. In Model Administration Tool, from the File menu, click Open, then In the Cloud, and use the Open in the Cloud dialog to specify the details of your semantic model.
    2. From the File menu, click Load Java Data Sources.
    3. At the Connect to Java Datasource Server dialog:
      • In the Hostname field, enter the machine name that you noted in Step 1. Fully qualify the hostname. For example, if you noted machine in Step 1, you might specify machine.us.example.com.
      • In the Port field, enter the port that you noted in Step 1. For example, 51811.
      • In the Username and Password fields, enter dummy or any string (these credentials aren't validated because this is a public call to discover the capabilities advertised by the Data Gateway).
  4. In Model Administration Tool, set up a physical database connection:
    1. In the Physical layer, create a local (not remote) connection to your data source using the standard call interface appropriate for your data source, and model the data as required.
    2. When you're ready to make a remote connection to your semantic model and publish it back to the cloud, edit the connection that you created.
    3. On the General tab, in the Call interface field select JDBC (Direct Driver), and in the Connection String field, specify the JDBC string and credentials in the semantic model connection. See JDBC and JNDI Templates and Examples below for a list of supported JDBC strings and driver classes.
    4. On the Miscellaneous tab, in the Use SQL Over HTTP field enter true, and in the RDC Version field enter 2, and specify the JDBC driver class.
    5. Publish the semantic model to the cloud.
You're now ready to test your deployment by connecting remotely to an on-premise database.

JDBC and JNDI Templates and Examples

When you set up remote connectivity for analyses and dashboards, you might have to specify JDBC strings and driver classes, and JNDI connection details and context details.

JDBC String Patterns and Driver Classes
Oracle:
   Driver Class: oracle.jdbc.OracleDriver
   jdbc string: jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=[\"host-name\"])(PORT=[\"port\"]))(CONNECT_DATA=(SERVICE_NAME=[\"service-name\"])))              
Amazon Redshift:
   Driver Class: com.oracle.jdbc.redshift.RedshiftDriver 
   JDBC String: jdbc:oracle:redshift://[\"host-name\"]:[\"port\"];DatabaseName=[\"service-name\"];EncryptionMethod=SSL;ValidateServerCertificate=false
Apache Hive
    Driver Class: com.oracle.bi.jdbc.hive.HiveDriver
    JDBC String: jdbc:oracle:hive://[\"host-name\"]:[\"port\"];EncryptionMethod=SSL;ValidateServerCertificate=false
DB2
   Driver Class: com.oracle.bi.jdbc.db2.DB2Driver
   JDBC String: jdbc:oracle:db2://[\"host-name\"]:[\"port\"];DatabaseName=[\"service-name\"]
Impala
   Driver Class: com.oracle.bi.jdbc.impala.ImpalaDriver
   JDBC String: jdbc:oracle:impala://[\"host-name\"]:[\"port\"];EncryptionMethod=SSL;ValidateServerCertificate=false
MySQL
   Driver Class: com.mysql.cj.jdbc.Driver
   JDBC String: jdbc:mysql://[\"host-name\"]:[\"port\"]"[/database][?properties]
SQL Server
   Driver Class: com.oracle.bi.jdbc.sqlserver.SQLServerDriver
   JDBC String: jdbc:oracle:sqlserver://[\"host-name\"]:[\"port\"];DatabaseName=[\"service-name\"]
Teradata
   Driver Class: com.teradata.jdbc.TeraDriver
   JDBC String: jdbc:teradata://[\"host-name\"]/DBS_PORT=[\"port\"]  
JNDI Templates for Native Drivers
Oracle:
      <Resource               
      name="jdbc/myoracle"               
      global="jdbc/myoracle"               
      auth="Container"               
      type="javax.sql.DataSource"               
      driverClassName="oracle.jdbc.OracleDriver"                
      url="jdbc:oracle:thin:@localhost:1521:orcl"               
      username="my_user"               
      password="my_password"               
      maxActive="15"               
      maxIdle="1"                
      maxWait="-1"
      />

      <Resource               
      name="jdbc/oracleolap"               
      global="jdbc/oracleolap"               
      auth="Container"               
      type="javax.sql.DataSource"               
      driverClassName="oracle.jdbc.OracleDriver"                
      url="jdbc:oracle:thin:@localhost:1522:orcl112"               
      username="my_user"               
      password="my_password"          
      maxActive="15"               
      maxIdle="1"                
      maxWait="-1"
      />

      <Resource               
      name="jdbc/oraclenorthwind"               
      global="jdbc/oraclenorthwind"               
      auth="Container"               
      type="javax.sql.DataSource"               
      driverClassName="oracle.jdbc.OracleDriver"                
      url="jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=example.com)(PORT=1234))(CONNECT_DATA=(SERVICE_NAME=MATSDB.EXMAPLE.COM)))"               
      username="my_user"               
      password="my_password"          
      maxActive="15"               
      maxIdle="1"                
      maxWait="-1"
      />

      DB2
      <Resource               
      name="jdbc/db2northdb"               
      global="jdbc/db2northdb"               
      auth="Container"               
      type="javax.sql.DataSource"               
      driverClassName="com.ibm.db2.jcc.DB2Driver"                
      url="jdbc:db2://example.com:58263/NORTHDB"               
      username="my_user"               
      password="my_password"              
      maxActive="15"               
      maxIdle="1"                 
      maxWait="-1" />

      SQLServer: 
      <Resource               
      name="jdbc/sqlservernorthwind"               
      global="jdbc/sqlservernorthwind"               
      auth="Container"               
      type="javax.sql.DataSource"               
      driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver"               
      url="jdbc:sqlserver://example.com:61045;DatabaseName=Northwind"               
      username="my_user"               
      password="my_password"           
      maxActive="15"               
      maxIdle="1"                
      maxWait="-1" /> 

      Teradata:
      <Resource               
      name="jdbc/teranorthwind"               
      global="jdbc/teranorthwind"               
      auth="Container"               
      type="javax.sql.DataSource"               
      driverClassName="com.teradata.jdbc.TeraDriver"                
      url="jdbc:teradata://99.999.99.999"               
      username="my_user"               
      password="my_password"           
      maxActive="15"               
      maxIdle="1"                
      maxWait="-1" />

      Mysql_community
      <Resource        
      name="jdbc/CEmysql"        
      auth="Container"        
      type="com.mysql.jdbc.jdbc2.optional.MysqlDataSource"        
      factory="com.mysql.jdbc.jdbc2.optional.MysqlDataSourceFactory"        
      username="my_user"               
      password="my_password"    
      serverName="example.com"        
      portNumber="3306"        
      databaseName="my_database" />
JNDI Templates for DD Drivers
The JNDI for DD Drivers.
SQLServer:
<Resource
name="jdbc/DDsqlserver"
auth="Container"
type="com.oracle.bi.jdbcx.sqlserver.SQLServerDataSource"
factory="com.oracle.bi.jdbcx.sqlserver.SQLServerDataSourceFactory"
user="my_user"
password="my_password"
serverName="example.com\MSSQLSERVER16"
portNumber="61045"
databaseName="my_database" />

DB2:
<Resource
name="jdbc/DDdb2"
auth="Container"
type="com.oracle.bi.jdbcx.db2.DB2DataSource"
factory="com.oracle.bi.jdbcx.db2.DB2DataSourceFactory"
user="my_user"
password="my_password"
serverName="example.com"
portNumber="58263"
databaseName="my_database"
/> 

Impala:
<Resource
name="jdbc/DDimpala"
auth="Container"
type="com.oracle.bi.jdbcx.impala.ImpalaDataSource"
factory="com.oracle.bi.jdbcx.impala.ImpalaDataSourceFactory"
user="my_user"
password="my_password"
serverName="example.com"
portNumber="21050"
databaseName="my_database"
/>

Spark:
<Resource
name="jdbc/DDspark"
auth="Container"
type="com.oracle.bi.jdbcx.sparksql.SparkSQLDataSource"
factory="com.oracle.bi.jdbcx.sparksql.SparkSQLDataSourceFactory"
user="my_user"
password="my_password"
serverName="example.com"
portNumber="10000"
databaseName="my_database"
/>

HIVE:
<Resource
name="jdbc/DDhive"
auth="Container"
type="com.oracle.bi.jdbcx.hive.HiveDataSource"
factory="com.oracle.bi.jdbcx.hive.HiveDataSourceFactory"
user="my_user"
password="my_password"
serverName="example.com"
portNumber="10000"
databaseName="my_database"
/> 

MySQL:
<Resource
name="jdbc/DDmysql"
auth="Container"
type="com.oracle.bi.jdbcx.mysql.MySQLDataSource"
factory="com.oracle.bi.jdbcx.mysql.MySQLDataSourceFactory"
user="my_user"
password="my_password"
serverName="example.com"
portNumber="3306"
databaseName="my_database"
/>

MYSQL:
<Resource
name="jdbc/DDmysql"
auth="Container"
type="com.oracle.bi.jdbcx.mysql.MySQLDataSource"
factory="com.oracle.bi.jdbcx.mysql.MySQLDataSourceFactory"
user="my_user"
password="my_password"
serverName="example.com"
portNumber="3306"
databaseName="my_database" 
/>
     

Add a JDBC Driver to Data Gateway

Add a JDBC driver to your Data Gateway installation so that you can model data in an on-premises database.

Before you start, ensure that Data Gateway and Model Administration Tool are installed on the same Windows computer in your on-premises environment.
  1. Download the JDBC driver that you want to deploy.
    For example, to model data in a Snowflake database, download the latest Snowflake JDBC driver (for example, in file snowflake-jdbc-3.9.0.jar).
  2. Copy the downloaded JDBC JAR file to the Data Gateway installation folder.
    • In a server deployment, copy the JAR file into: <Data Gateway install_location>/domain/jettybase/thirdpartyDrivers.
    • In a personal deployment on Windows, copy the JAR file into: <Data Gateway_extract_path>\thirdpartyDrivers.
    • In a personal deployment on MacOS, copy the JAR file into: <Application->Show Package Contents>Resources->app.nw-> thirdpartyDrivers.
  3. Re-start Data Gateway. See Maintain Data Gateway.

DSN Formats for Specifying Data Sources

In Oracle Analytics you can model your on-premises data for many database types. Oracle Analytics supports direct access to some on-premises data sources through the semantic model. When you create the database connection using Model Administration Tool, in the Data source name field on the Connection Pool dialog (General tab) you use the appropriate DSN format for the database type you're connecting to.

Amazon Redshift:
       DRIVER=Oracle 7.1 Amazon Redshift Wire Protocol;HOST=["host-name"];PORT=["port"];DB=["service-name"]
      SSL: DRIVER=Oracle 7.1 Amazon Redshift Wire Protocol;HOST=["host-name"];PORT=["port"];DB=["service-name"];EM=6;CPV=TLSv1.2,TLSv1.1,TLSv1, SSLv3, SSLv2;VSC=0
Apache Drill:
       DRIVER=MapR Drill ODBC Driver;Host=["host-name"];Port=["port"];CastAnyToVarchar=true;ExcludedSchemas=sys,INFORMATION_SCHEMA;AuthenticationType=Basic               Authentication;ConnectionType=Direct
Aster:
       DRIVER=Aster ODBC Driver;SERVER=["host-name"];PORT=["port"];DATABASE=["service-name"]
DB2:
      DRIVER=Oracle 7.1 DB2 Wire Protocol;IpAddress=["host-name"];PORT=["port"];DB=["service-name"]
      SSL:  DRIVER=Oracle 7.1 DB2 Wire Protocol;IpAddress=["host-name"];PORT=["port"];DB=["service-name"];EM=1;VSC=0
Greenplum:
       DRIVER=Oracle 7.1 Greenplum Wire Protocol;HOST=["host-name"];PORT=["port"];DB=["service-name"]
Hive:
       DRIVER=Oracle 8.0 Apache Hive Wire Protocol;HOST=["host-name"];PORT=["port"]
      SSL: DRIVER=Oracle 8.0 Apache Hive Wire Protocol;HOST=["host-name"];PORT=["port"];EM=1;VSC=0
Impala:
       DRIVER=Oracle 7.1 Impala Wire Protocol;HOST=["host-name"];PORT=["port"]
     SSL:  DRIVER=Oracle 7.1 Impala Wire Protocol;HOST=["host-name"];PORT=["port"];EM=1;VSC=0
Informix:
       DRIVER=Oracle 7.1 Informix Wire Protocol;HOSTNAME=["host-name"];PORTNUMBER=["port"];DATABASE=["service-name"]
MongoDB:
       DRIVER=Oracle 8.0 MongoDB;HOST=["host-name"];PORT=["port"];DB=["service-name"]
MySQL:
      DRIVER=Oracle 7.1 MySQL Wire Protocol;HOST=["host-name"];PORT=["port"];DB=["service-name"]
PostgresSql:
       DRIVER=Oracle 7.1 PostgreSQL Wire Protocol;HOST=["host-name"];PORT=["port"];DB=["service-name"]
Spark:
      DRIVER=Oracle 8.0 Apache Spark SQL;HOST=["host-name"];PORT=["port"]
      SSL:  DRIVER=Oracle 8.0 Apache Spark SQL;HOST=["host-name"];PORT=["port"];EM=1;VSC=0
SQL Server:
     DRIVER=Oracle 7.1 SQL Server Wire Protocol;HOST=["host-name"];PORT=["port"];DB=["service-name"]
     SSL:  DRIVER=Oracle 7.1 SQL Server Wire Protocol;HOST=["host-name"];PORT=["port"];DB=["service-name"];EM=1;VSC=0;CryptoProtocolVersion=TLSv1.2,TLSv1.1,TLSv1,SSLv3,SSLv2
Sybase:
       DRIVER=Oracle 7.1 Sybase Wire Protocol;NA=["host-name"], ["port"];DB=["service-name"]
Teradata:
       DRIVER=Oracle 7.1 Teradata;DBCName=["host-name"];port_name=["port"]