Add column if doesn't exist

Hi,

Is there a way to add a column with a fixed value if doesn't exist?

Thanks

1 Like

look for the node 'constant value column'

As you need to check if the column exists, you must aply a workaround.

Extract the column header and transpose it into flow variables (Extract Column Header-> Table Row to Flow Variable) then use a Java Edit Variable to check the column names. Than generate with the JEV a FlowVariable saying both or bottom. This you can feed into a If Switch node. And generate with the Constant Value Column the column only for the top part. Don't forget to collect both branches from the if node with a End If node.

Cheers, Iris

1 Like