One Star

Ingres 9.2 and Regular Expressions

Hi there,
I want to run a table analysis on Ingres 9.2 tables. I can choose any of the predefined regular expression patterns such as checking if a record has a numeric pattern.
I undertand from issue # 0005720 that if Ingres doesn't support regular expressions natively then its not going to work. (Ingres 9.2 doesn't support regular expressions.)
Is this the case? In Talend Open Studio, regular expressions are run through java on data in memory so there isn't this requirement for Ingres to support regular expressions.
Is there any way I can get regular expressions towork using an Ingres connection? If not, that would unfortunately eliminate a lot of the potential functionalit of T.O.P for us. It would leave us with only with native functions such as like '% ' patterns which are far less powerful.
I also tried using regular expressions in the column analysis.
Here there was the option to choose Java as the engine rather than SQL so I tried that in case it might apply regular expressions through java on data in memory, but same problem.
Regards,
John.
Last edited by RevenueIrl
5 REPLIES
Employee

Re: Ingres 9.2 and Regular Expressions

Hi John,
In column analysis, when you choose the "java" engine, the regular expressions will be evaluated through Java (and not through SQL).
But because the Java regex engine and the database regex engines do not work in an identical way, regular expressions will often be different in Java and in SQL.
I guess the error you got was due to a missing regex for the java engine.
Open the regex editor of the pattern that you want to use and see whether there is a definition for the java engine (or at least the Default). In general, regexes used with a database will work with the java engine (though they may perform worse). Be careful, MySQL requires that \ are doubled: \\ . Java does not require that.
One Star

Re: Ingres 9.2 and Regular Expressions

Hi Seabastiao,
Yes, I just want to use the java regular expressions for now because I don't think Ingres 9.2 supports them within the db.
I added a very simple regular expression for java the the list of patterns. It is just
''
and I save it as JohnReg. I save it as a java regular expression.
In my column analysis I choose the java execution engine and then I try to add the JohnReg regular expression to the column but I get the error message below. The error message seems wrong because I am not trying to do sql regular expressions but java regular expressions.
"The system indicator don't include purpose sql expression for the database so you can't add regular expressions now. You shoudl add a new indicator pattern for the database in system indicator "Regular Expression Matching" before adding regular patterns. If the database does not natively support regular expressions, you must define a function for handling regular expressions in the database."
Employee

Re: Ingres 9.2 and Regular Expressions

Hi John,
did you select the "java engine" parameter in the analysis setting?
If yes, this may be a bug.
A workaround will be to set the "ALL_DATABASE_TYPE" instead of "Java" in the pattern editor.
One Star

Re: Ingres 9.2 and Regular Expressions

Hi Sebastiao,
Yes, I have "java engine" specified in the analysis.
OK, I got it working following your line of reasoning. Well, I added the "ALL_DATABASE_TYPE" regular expression definition to the regular expression. That didn't do it. But I added that "ALL_DATABASE_TYPE" to the indicator definition for regular expressoin matching also. That did it.
Yes it must be a bug as I'm not using the sql regular expression anyway. But the workaround works around it!
Thanks,
John.
Employee

Re: Ingres 9.2 and Regular Expressions

Thanks John, I've created the following issue so that it will be soon.
17172