Forum Discussion

Manzoor's avatar
Manzoor
New Contributor
2 years ago
Solved

How to count the columns in table

Hi Team, I'm pulling data from the source system which have "n" columns, I wanted to count the number of columns that I'm getting from the Source System. So that to map them with the respective Tar...
  • j_angelevski's avatar
    j_angelevski
    2 years ago

    Hi Manzoor ,

    You can use the following expression to replace the NULL values with blank in the entity object, assuming it is a flat object.

    $entity.mapValues(val => val == null ? "" : val)

    This will simply iterate over each value in the entity object, and check if the value is null, if it is, it will return an empty string otherwise it will return the original value.