Professional Documents
Culture Documents
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) S2TGen.properties 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
S2T_ETL_Generate_Mapping_XML.java 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)
S2T_ETL_Generate_Session_XML.java 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 S2T_ETL_Generate_Control_XML.java 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.