URGENT: Unclosed group near index 39 error Rule Engine

Hi All,

I’m trying to compare two tables row by row and successfully created the workflow that could help me in doing so. While updating the input docs and doing some manual changes that were required (col rename, col filter etc) I run into a error I didn’t receive before hand.

After joining both tables I have a rule engine that compares the files and provides insight as to what differs between the tables. It is at this rule engine that I receive an error: Attached I have a screenshot of the error… Can someone please help. It is urgent…
knime

Kind regards,

Rutger

Hi @rutgerverhaar, welcome to the forum. Are you able to copy and paste here the text that you have in the rule engine config, as the error is going to be in that text I would think.

Also a screenshot of the overall rule engine config would be helpful.

It looks from what your screenshot shows that is complaining about a bracket mismatch, but I’m not sure what the whole text is…

1 Like

Hi @takbb

The odd thing is that the rule-engine was working initially. After updating the documents the rule-engine started giving issues, however I haven’t changed anything in the rule-engine logic…

Hi @rutgerverhaar and welcome to the forum.

It’s hard to say definitively based on screenshots, but I would guess that the node is having trouble parsing parentheses that appear in your data, that perhaps didn’t before?

Perhaps additional column name parsing beforehand would help?

2 Likes

Hi @ScottF I haven’t got a pc in front of me to play with today, but does MATCHES in a rule engine use regex? In which case that would be the issue maybe? That would certainly explain the error…

@rutgerverhaar what is your intended rule here where you use MATCHES? Wondering if you just intended it to be an equality test?

Edit… Yes I just dug out the documentation. Your problem is that you are using matches and your data contains a mismatched bracket I think. So it fails the regex parser with an unclosed group error. Maybe you just meant to use = instead of MATCHES?

5 Likes

I found out that, when I worked with various people using Knime, 95% of them mistakenly thought, in the Rule Engine, that = is used for numeric comparison, and MATCHES is for string comparison. I am not sure why that is the case and why it is the majority of them who believed this. I had to educate them about how you would still do string comparison with =, and that MATCHES is for regex comparison.

Hi @rutgerverhaar , I think that you just want string comparison here, is that correct? If that is the case, you should use = instead of MATCHES as @takbb mentioned. The reason why it worked before is simply because of the data. You most probably did not have “special characters” in your data before, and were lucky so far, but this time it does look like your data have characters that are part of the regex syntax, and the data is considered malformed/invalid regex strings.

3 Likes

@bruno29a you are a true hero! Swapping = for MATCHES seems to solve the issue and took care of some smaller mismatching issues as well!

Can’t thank you enough!

4 Likes

Hi @rutgerverhaar , the credit should go to @takbb as he suggested that change before I did.

I was merely explaining when = and MATCHES should be used, and also explaining why it worked for you previously.

So, please flag @takbb 's post as the Solution :slight_smile:

3 Likes

@takbb Thank you! Not all hero’s wear capes…

3 Likes

thanks @bruno29a … I didn’t mind as you deserve credit for your great contributions too (and you gave a more detailed explanation of what I’d hinted at), but thank you :wink: and thanks @rutgerverhaar for validating. Glad we all got there! It’s always good to see a thread get marked as “solved”

4 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.