Search code examples
pentahopentaho-data-integration

How to type a tab in the Parameters sheet of the transformation properties page in Pentaho


I am trying to create a transformation in Pentaho which should check if a file field delimiter (this is a character which separates the different fields in a file--in a csv file, for example, the delimiter is a ,) is a tab.

I have created a parameter called FieldDelimiter (in the properties section of my Pentaho transformation). Now, I want to specify the "Default Value" for this parameter to be a tab. However, when I hit the tab key, it doesn't actually insert a tab in the "Default Value" column (in fact, nothing gets inserted in the "Default Value" column). Is there any way I can insert a tab in this column?

enter image description here


Solution

  • I don't think it is possible still to use a tab as a default value in a variable. This thread in the old Pentaho forum propose to use a Modified Javascript Value step to calculate the separator and pass it as a parameter to the transformation reading the file: https://forums.pentaho.com/threads/231143-Handling-tab-seperated-values-and-comma-separated-values-in-text-file-input/

    You don't pass the tab as a default value, but calculate the separator and then let Pentaho internally to handle the tab as variable value with whatever it uses.