Hi all, I want to load the data from dimension tables to fact table. In this case i have to load the unique row number in fact table . Its like as a sequence generator in ETL- Inofrmatica . How can i do ? plz expecting ur reply thanks guru
If you have a Database SEQUENCE for example it exist in ORACLE you can reuse the Oracle Sequence using the Additional Columns fucntion of the Advanced TAB of your DatabaseOutput component. You name the COLUMN where you want to put the SEQUENCE; you use the Position Replace; and then you use the proper expression in the SQL expression (for example my_seq.nextval). Another scenario would be to have a connector that RETRIEVE your SEQ first; then you assign the VALUE to a a Context variable and you start from there a Talend sequence using the routine Numeric.sequence. There is so many ways for doing it. Which one are you looking forward; the one which stick with the DB; or the one which is less DB activity consuming etc... Best regards.
Hi cantoine, i could run my job successfully when i had Oracle Table as my final table. how can i achieve same results if i want to write into a delimited file. i dont want to use second approach mentioned in your previous reply. thank you for your quick response.
If I understand you want to Incremental a SEQUENCE to store in a FILE, right ? This sequence value is coming from an Oracle Table, right ? The only way of doing it is to call the current SEQUENCE VALUE from a tOracleInput at the begining of your JOB; and then use this value as a ContextVariable to start your Numeric.Sequence routine in your tMap; then this values will be written in your FILES. In the meantime if you need to refresh the Sequence at the end of your PROCESS; you will have to call a tOracleROW and perform the query to update your SEQUENCE value with the current Numeric.Sequence or do a + File_NUMBER_OF_ROWS from the Global Variable. Hope it helps.