set a column to Null based on a condition with DSS Formula

Solved!
moufkir
Level 2
set a column to Null based on a condition with DSS Formula

I have a column that I want to set to Null based on condition on another column value.

I succeeded to build the formula but did not find the keyword for Null

if(and(isNotNull(myColumn) ,myOtherColumn!= 'VALUE'), NULL, myColumn)

For the moment I put '' instead, but this is not what I want.

 Thank you for your answer,

Mohammed

0 Kudos
1 Solution
Clรฉment_Stenac

Hi,

In a database it's indeed different. However, the prepare recipe will always write-out NULL to the database for empty cells.

View solution in original post

0 Kudos
4 Replies
Clรฉment_Stenac

Hi,

The prepare recipe does not distinguish between empty string and null so '' should do what you want.

0 Kudos
moufkir
Level 2
Author

Thank you Clรฉment for your reply.

The issue is that the column is used later in the flow in a join reciepe and then the blank '' is different from Null  (Database wise)

0 Kudos
Clรฉment_Stenac

Hi,

In a database it's indeed different. However, the prepare recipe will always write-out NULL to the database for empty cells.

0 Kudos
Arnabg_ab
Level 1

So what is the option to distinguish the blank or Null value once extraction happening from Source database?

0 Kudos