datastageibm-infosphere

How to make ibm data stage read specific job parameter value from source


I'm trying to capture filename being input to my data source into table column source_file, for the filename I created a job parameter sales*; I tested it with files sales.xlsx and sales_copy.xlsx.

It successfully executed to input the data except for the source_file column in the database, it should be sales.xlsx and sales_copy.xlsx. But what the database read is sales* because in the mapping derivation for source_file column I set it as source_param which value is sales*.

How do make I it specifically read the filename sales.xlsx and sales_copy.xlsx not sales*?


Solution

  • I don't think it takes the names from the parameter value as a column in the parallel job when you define it as 'Sales*.xls' (It takes Sales*.xls as a constant no mater where you define it either in the sequential file as a file name or you pass it as a parameter).
    What you can do is

    1. Define your parallel job where you define File Name Column as column name in sequential file stage (Where you import the data), and the file name has to be defined by the parameter.
    2. Create a Sequential file where you call the above parallel job in a loop where you pass all the file names as a loop counter for the file name parameter(Loop works both strings and numeric values).