Skip to Content
avatar image
Former Member

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

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Dec 20, 2016 at 10:03 PM

    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

    Add comment
    10|10000 characters needed characters exceeded