Start a new topic
Answered

Lookup enricher : fallback value setting or using a custom SQL

Hello,


I would to now if it possible to personalized the fallback value parameter with some SQL?

In my case, what I want to obtain is the following :

- If  the lookup does return nothing with the lookup_value, use the following fallback value instead "SPLIT_PART('lookup_value', '_', 3)"


If is not possible, what are the possibilities with custom SQL parameters? Since the documentation does not give a complete example of custom sql.


Thanks! 


Best Answer

Hi Aubin,


hopefully, I got your question right.


Your semQL could look like this :

 

SPLIT_PART(coalesce(<your lookup expression>, '<you_fallback_value>'), '_', 3)

 If I got it wrong, please provide a very simple case with data to help me help you!


I hope this helped.

Best regards,

Stéphanie.


Answer

Hi Aubin,


hopefully, I got your question right.


Your semQL could look like this :

 

SPLIT_PART(coalesce(<your lookup expression>, '<you_fallback_value>'), '_', 3)

 If I got it wrong, please provide a very simple case with data to help me help you!


I hope this helped.

Best regards,

Stéphanie.

Hello Stephanie,

I've tried to add custom SQL in the parameter "Fallback value" but it takes the code as a string, it does take it as a code to interpret.  

Anyway, thanks for the help.

Login to post a comment