Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Parse external defined expression in tmap

Hi Community,

 

I have the requirement to bring in some flexibility in some use cases. For example a job which should calculate prices based on certain rules. I was thinking to have a database table to have those rules, like "$uvp-20%" or "$bp+30%" or "$bp+30% < $uvp?$bp+30%:$uvp".

 

Is there a best practice or an example how to build such system?

 

Thanks for all your feedback,

Chris 

Labels (2)
3 Replies
TRF
Champion II
Champion II

Did you consider to use a Business Rules Management System?
You should have a look at https://help.talend.com/reader/uwwCVAHxWDS6l5fZQ~lVYA/MaM9hIC4bbFetAUP6xvSWQ
Anonymous
Not applicable
Author

I did, but this is more a possible next step of the solution. At the current time there is not the space to learn a complete new technology.

 

EDIT: I just realized - I would need a subscription to use drools, too.

TRF
Champion II
Champion II

The problem is not to store the rules but to execute them as it seems you want to use a kind pseudo-code.
So, you need to be able to transform this pseudo-code into pure Java code, then compile it and execute it, all of this while your job is running. Right?
If so, you can find a lot of examples if you search arround of "dynamic java code".
Here is one of them https://www.quora.com/How-do-I-generate-a-dynamic-Java-class-and-execute-it