6 Replies Latest reply: Aug 1, 2017 2:12 AM by Tomasz Truszkowski RSS

    Reformat field contained in several tables

    Jon Argandona

      There is a field shared by several tables for which I would like to apply a transformation.

      For instance, lets consider a case with three tables, I would like to keep only the part after the last '/' for the field TrField and keep it with that name if possible. To that end I would use SubField(TrField, '/' ,-1) AS TrField.

      However, I cannot do that operation before loading the data as I don't know the number of tables and their variables in advance.

      Is there a way not involving several for loops and table copies to apply a transformation on a Field over different tables.

       

      Source1:

      LOAD

      *

      INLINE

      [

      TrField,Value1

      Path\T1,1

      A\Path\T1,1

      A\Path\T2,1

      ];

       

       

      Source2:

      LOAD

      *

      INLINE

      [

      TrField,Value2

      Path\T1,2

      B\Path\T1,2

      A\Path\T2,2

      A\Path\T4,2

      ];

       

       

      Source3:

      LOAD

      *

      INLINE

      [

      TrField,Value3

      Path\T1,3

      A\Path\T1,3

      A\Path\T2,3

      A\Path\T4,3

      A\Path\T5,3

      ];