Skip to Content
0

Can you use case or if/then logic in a filter node in a HANA SDI flowgraph?

Dec 20, 2016 at 02:59 PM

129

avatar image

I am trying to implement some simple if/then logic in the mapping expression of a filter node in an SDI flowgraph. I keep running into syntax errors, and can't seem to find any documentation on whether this is even possible.

The expression I feel like should work takes the following form:

IF( "x"=1, 10, 100)

Where "x" represents an input field to the filter node. However, when I try this I get an internal error saying the SQL expression cannot be converted to a CS expression.

Is if/then logic possible in a Filter node? I tried CASE, and got a similar error. Can somebody point to some documentation for one of these functions if it is possible?

Thanks,

Anthony

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Timo Wagner
Dec 20, 2016 at 10:03 PM
0

Hi Anthony,

the following expression should work for your example.

CASE WHEN "x" = 1 THEN 10 ELSE 100 END

To extend it you can also specify another WHEN <condition> THEN <output> block before the ELSE block.

Best Regards,

Timo Wagner

Share
10 |10000 characters needed characters left characters exceeded