You are on page 1of 3

S2T ETL Gen 1.0 Components Involved Below is List of files involved in the utility.

Java files will be compiled to generate a class file which actually does the operation. We will discuss the functionality of Java files.

ojdbc14.jar o This JAR files can be downloaded by Google and if you find it in a .ZIP format you can just rename .zip to .jar. When you upload these files to Linux/ Unix Server, transfer them in Binary Mode. This Jar files helps us to connect to Oracle Database (Java Database Connectivity Package) o Properties File which can be configured to read from which Database. o Source and Target Connections to be used in Session. o Any Filter Condition to be applied for Source Filter in Mapping. o If you need full data then apply an condition 1=1 which will pull all records.
# Chandra Guptan Bose # 3/5/2012 # This File Defines the Configuration Parameter Files # Define Database Parameters host=home port=1526 service=HRS username=chandra password=chandra #Define Condition For all Mappings Generated By Tool condition=time_id=20111231 #Define Session DB Connections src_infa_cnx=S2TGen_source tgt_infa_cnx=S2TGen_target sess_config=default_session_config o This Java Program frames the Mapping which includes Source, Target definition in XML format. o By using the above connection programs logins to Database queries ALL_TAB_COLUMNS tables and alters data type understandable by Informatica. o Frames XML which connects columns from Source to Target. o This Program needs to compiled using java (Java Compile Utility) o This Java Program frames Session XML which gets parameters from the properties file for Source, target connection and Session configuration name. o This doesnt login to database. o This Program needs to compiled using java (Java Compile Utility o Doesnt login to Database. o Defined whether to replace / reuse in case of any conflict. o This Program needs to compiled using java (Java Compile Utility S2T_ETL_Generate_Import_Code.ksh o GUI Format Shell Script which prompts for user input for each attribute needed for program to execute and Import. o Change Bold area to point to your domain pmrep connect -r $REPONAME -n $USERNAME -x $PASSWORD -d domain_dev S2T_ETL_Generate_Import_Code_Batch.ksh o When this utility needs to be executed in batch mode where multiple tables mappings to be generated without manual interference. o Change Bold area to point to your domain pmrep connect -r $REPONAME -n $USERNAME -x $PASSWORD -d domain_dev

To Execute in GUI mode. Please compile all java files before executing shell to avoid any errors. Table Name and Schema Name should be in UPPERCASE

To Execute in Batch Mode following is Command line For Linux (Watch Spaces Between Linux Arguments)

Syntax:ksh S2T_ETL_Generate_Import_Code_Batch.ksh <Repo Name> <username> <password> <InfaFolder> <TableName> <Schema> Call Sample:ksh S2T_ETL_Generate_Import_Code_Batch.ksh DEV_REPO CHANDRA password1 guptanc EMPLOYEE_B HR We can write one-liner command for multiple table names and can place it a Parent Linux script and trigger it which will call this program one by one.

Steps to Configure Utility

Selection A Location in Linux Server (Lets Assume its /home/Chandra) Create a Folder using below commands o mkdir S2TGen1.0 o chmod 777 S2TGen1.0 Copy ojdbc14.jar from your local machine to /home/Chandra /S2TGen1.0 chmod 777 /home/Chandra /S2TGen1.0/ojdbc14.jar Set PATH of your .bash_profile or alter environment variables to have below o # User specific environment and start-up programs o export PATH=$PATH:/ifx/informatica/pc86/server/bin o export CLASSPATH=$CLASSPATH:/opt/CA/SharedComponents/JRE/1.5.0_11/lib/tools.ja r:/home/Chandra/S2TGen1.0/ojdbc14.jar:. o export PM_HOME=/ifx/informatica/pc86/server/bin o export INFA_HOME=/ifx/informatica/pc86 o export HOSTNAME=$(hostname | cut -f1 -d.) o export LD_LIBRARY_PATH=$INFA_HOME/server/bin o export PORT_NO="4003" ( Change Accordingly Where Your Domain Listens To) o export JAVA_HOME=$INFA_HOME/java/bin o Copy Files attached in Block to /home/Chandra/S2TGen1.0 o Run javac *.java o All Program should compile with No Errors / Warnings o Possible errors may be because of Class path which can be corrected changing above variables set. To run utility in gui Mode run S2T_ETL_Generate_Import_Code.ksh To run utility in Batch Mode run S2T_ETL_Generate_Import_Code_Batch.ksh