Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a set of files to load say 3 files. I first load the STG0 load control table in which I generate batch id and file id and derive the file name (((String)globalMap.get("tFileList_1_CURRENT_FILE")) ). So When I load 3 files in one batch and 2 files in the next batch, the target will look like
BATCh ID | FILE ID | FILE NAME |
1 | 1 | FILE1 |
1 | 2 | FILE2 |
1 | 3 | FILE3 |
2 | 1 | FILE4 |
2 | 2 | FILE5 |
Next I have to load the STG1 table with the data coming from the file along with the batch id and file id generated in the STG0 table. I created a tDBInput pointing to STG0 table as the look up as shown in attached screenshot. But I am not sure how to create a variable to store file name and pass it on to the look up to get batch id and file id. I am new to talend. Any help would be appreciated.
JR,
I tried giving the query as "select LD_FIL_NAME,LD_BATCH_ID, LD_FIL_ID from stg_0_ld_cntl_nmc ". I removed the where condition.
I retained the LD_FIL_NAME in the tmap as you had suggested. Now I see 3 records were returned from the look up and the STG1 table got populated properly.
Thank you so much for your help.