I want to grab a portion of a line with something like this somewhere in the string: 121ms 11232 455433 BATCH(11) SELECT table_name from sys_tables
In the line there can be nearly any number of space separated strings between the 'ms' and "SELECT"
and "SELECT" can be any SQL keyword and can be in upper or lower case
I want to do something like this: \d+ms\s(**)\sSELECT|select|INSERT|insert|DELETE|delete
to grab the values between "ms" and the the SQL statement. I also need a pattern to grab from the beginning of the SQL statement to the end of the line. I've tried a few things without success. Is this possible, if so, how?
This will grab the characters starting with one of a set of words (SQL commands in this case) and match from there to the end of the line. Note the trick was to put two groups inside of a group ((word1|word2|word3)(.*))
I know everything has already been sorted by email but thought it best to include it on here as well, in case anyone else has the same question.
In your datatypes page you'll want to make a new field which will be used for your lower case values.
In your case, I believe the field you want to convert is called 'sqlop' so we'll want to use a groovy script to lower the case of the sqlop field. To use a groovy script, start your synth expression with "groovy-script:" in your case we want to take the sqlop field and make sure its the same case, so we'd use the following groovy script.