Home > Mobile >  How to use the newly created column in Derived Column Transformation again in the same Derived colum
How to use the newly created column in Derived Column Transformation again in the same Derived colum

Time:11-19

Suppose I created a column named 'Studata' in derived column where in expression is

right({someothercolname},4)

And in the same derived column , I created other column 'studata2' where in expression I wanted to give as left({Studata},1). So this is throwing error because I cannot use the same column created in same derived column transformation.

So without an extra derived column ,can we achieve this within same derived column transformation?

CodePudding user response:

  • Derived column transformation fetches the schema on the incoming stream and only perform the expressions based on that column only.
  • The columns which you create in Derived column transformation are accessible in next transformation only not in same Derived column transformation.
  • I as it fetches the schema of previous stream only so it will throw error as column not found.

enter image description here

Work around is to use two Derived column transformations one after another as below:

enter image description here

enter image description here

Output

enter image description here

  • Related