Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

A database driver is used to specify the type of database and driver jar files that are required to connect to that database. Database jar files are drivers that are used to connect to database servers. There are specific jar files for a specific database server. These jar files are available with the database servers. Driver jar files can also be obtained from the following locations:

Oracle Server 
http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/index.html

SQL Server 
http://www.microsoft.com/downloads/details.aspx?FamilyID=07287B11-0502-461A-B138-2AA54BFDC03A&displaylang=en

 

Steps to create a Database Driver

...

In the Upload Driver Jar File(s), browse to and upload the driver jar files for the database. 

On the Upload Jar File window, browse to and select the jar file. The path of the selected jar file is displayed in the Browse File text box

A list of required Jar files for different databases is in the following table.

Database Servers

Driver Jar Files

Oracle

Classes12.jar 
For Oracle BLOB Data type: 
base.jar, oracle.jar and util.jar

IBM DB2 (Ver 7.1)

db2java.zip (7.1 version) 

IBM DB2 (Ver 8.1)

db2jcc.jar 

MS SQL

msbase.jar, mssqlServer.jar and msutil.jar 

JTDS-SQL Server

Jtds.jar

HSQL DB

hsqldb-1.7.2.jar

...

Repeat steps 5 to 6 to upload additional jar files.

 

Info
If required, you can also unload the JAR files. To unload jar files, click Unload JAR.

...

Click Finish to return to the Create Database Driver Info window. The uploaded jar file(s) is displayed in the Upload Driver Jar File(s) field.

Enter the main class name of the database in the Driver Main Class Name. Driver Main Class Name is a fully qualified Java class name for the main database driver class. The driver class name typically starts with a com., net. or org. followed by the company domain.

For example, the JDBC driver class for mysql.com is called com.mysql.jdbc.Driver. Click Get Driver Class to select the Database Driver Main Class Definition from the Select Class drop-down list.

...

Database Servers

Driver Main Class Definition

Oracle

oracle.jdbc.driver.OracleDriver 
For Oracle BLOB Data type: 
com.ddtek.jdbc.oracle.OracleDriver

IBM DB2 (Ver 7.1)

COM.ibm.db2.jdbc.net.DB2Driver

IBM DB2 (Ver 8.1)

com.ibm.db2.jcc.DB2Driver 

MS SQL

com.microsoft.jdbc.sqlServer.SQLServerDriver

JTDS-SQL Server

net.sourceforge.jtds.jdbc.Driver

HSQLDB

org.hsqldb.jdbcDriver

MS Access

sun.jdbc.odbc.JdbcOdbcDriver

MS Excel

sun.jdbc.odbc.JdbcOdbcDriver

...

Record to Record Service takes inputs record by record and processes them according to the defined logic using java programming construct, and gives the output one record at a time. User can write Java logic that will be executed in this service. The Java logic has access to Record to Record script service, context of the process flow this service belongs to, input and output Stream handlers, which allow Java logic to access and manipulate input data to generate output and pass it to another service in the process flow. 

Prerequisites

  • Layout service must be created before creating Record to Record Service.

Steps to create Record to Record service

  1. Click Configure > DATA TRANSFORMATION > Record to Record.

  2. Click Create Record to Record.

  3. On the Create Record to Record window, enter the name and description of the new Record to Record service in the Name and Description fields.

    Image Added

  4. Enter the sample Java script as explained below to perform the desired transformation.

    Template Script:

    Note: the complete script is executed for each record.
     // Setting Process Flow variable (nextRecord) value
     context.put("nextRecord","no");
     // Setting one record into Process Flow Context
     context.put("RecordData",record);
     // Wait for Process Flow variable(nextRecord) value to be changed to 'yes'
     while(true)
     {
     try
     {
     String recordExist = (String)context.get("nextRecord");
     if(recordExist.equalsIgnoreCase("no"))
     { Thread.sleep(1000); }
     else
     break; }
     }
     catch (InterruptedException e)
     { e.printStackTrace(); }
     }

     

  5. Select input and output format as either XML or Native (non XML) from the Input Format and Output Format drop-down lists respectively.
  6. Select the source layout service from the Schema Name (Input data) drop-down list.

    Info
    If any XML Layout is selected in the Schema Name(Input data)drop-down list then the Input Format must be selected as XML.


  7. Expand the Advanced Properties section and select the Project from Project drop-down list.

  8. Click Save.