Professional Documents
Culture Documents
Strategies
Strategies
Strategies
Procedure:
Drag and Drop the below components with Metadata tPreJob,tOracle
Connection,tOracleInput with ETL Control metadata, tJavaRow,
Create a 2nd Subjob with the following components Source with product_Details
metadata with tOracleInput ,target tgt_product_details and tOracleRow with etl
control table.
Connect them together by using Row > Main link.
Double click the tOracleInput with ETL Control define the properties .
Double click the tJavaRow and define the properties.
// output_row.name = input_row.name.toLowerCase();
context.last_success=TalendDate.formatDate("dd-MM-yyyy",input_row.LAST_SUCCESS);
context.current_run=TalendDate.formatDate("dd-MM-yyyy ",TalendDate.getCurrentDate());
System.out.println("Last Success : " +context.last_success);
System.out.println("Current Run : " +context.current_run);
Double click the source product_Details metadata with tOracleInput and define the
properties.
"SELECT
SRCVENKAT.PRODUCT_DETAILS.PRODUCT_ID,
SRCVENKAT.PRODUCT_DETAILS.PRODUCT_NAME,
SRCVENKAT.PRODUCT_DETAILS.PRODUCT_TYPE,
SRCVENKAT.PRODUCT_DETAILS.PRODUCT_PRICE,
SRCVENKAT.PRODUCT_DETAILS.CREATED_ON,
SRCVENKAT.PRODUCT_DETAILS.MODIFIED_ON
FROM SRCVENKAT.PRODUCT_DETAILS
where to_char(created_on)>= ' " +context.last_success +
"' or to_char(modified_on)>=' " +context.last_success +" ' "
Double click the target tgt_product_Details metadata with tOracleOutput and define
the properties.