Calling Global parameter in Column assigner


(Imran Chandio) #1

I have a Plan which reads data from excel analyse data and drop to database.
excel read component has 3 parameters and job is called calling these parameters.

  1. Filename
  2. SheetName
    3)StartColumn

I would like to call SheetName parameter in Column assigner to assign a concatenated value and load it to Database.

Is this possible ?


(Vladimir Zvorygin) #2

Hi, Imran.

Yes, you can do it, though it may seem a bit confusing.
The parameter mapping is implemented in a way, that you can map only the whole property, so you cannot use parameters in an expression of, for instance, Column assigner. You map the whole expression of Column assigner as a parameter. But it cannot be the same parameter due to different value types: the sheet name will be passed as ‘your_sheet_name’ and the expression with the same value - as ‘“your_sheet_name”’ (in IDE the first quotes - ’ - will be removed, but in a workflow, for example, you’ll see it like that).

Regards,
Vladimir.


(Imran Chandio) #3

I would massively appreciate if you could attach an example.

I have tried few itterations of your explanation but none of them worked.


(Vladimir Zvorygin) #4

Imran,

please, find the example attached
mapping_example.zip (8.0 KB)
The two ways are represented there:

  1. the Expression property of column ‘Field_A’ is mapped as parameter ‘expression’
  2. the column ‘strset’ from Random record generator is mapped to parameter ‘sheetName’, and as the only item in a set, it will be used to fill up the record in this column. In Join step it can be used separately - as it is now, or concatenated with other values.

To parameter ‘sheetName’ in a workflow I passed value ‘Sheet2’, to parameter expression - ‘“Sheet2”’.

Regards,
Vladimir.