Regex pattern for EXCLUDING tables in IDEA datasources
In the Data Sources Properties dialog there is Table names pattern which is regular expression for including matching tables. I have a problem that there is no support for excluding tables.
I need to exclude some tables, because in our testing database there are like 30 tables with strange names like "BIN$QGKrW0b/UrXgQDg5xlFNTw==$0" which I can't normally see but the data source dialog will somehow discover them. On data source refresh button I get an error (see image file) because the table name contains some slashes.
Theoretically I can try to write negative regex but you should know that this is very complicated. Man can spend hours just figuring out how write one.
Attachment(s):
idea error 2008-03-04.JPG
Please sign in to leave a comment.
Give the following a try - it will remove all of the BIN tables, although looking at it now you should probably make it a bit more specific by including the dollar sign as well:
.*
Message was edited by:
Simon Knott
This will knockout all my tables which contain letters B or I or N. But thanks for a try.
Christ, must have been asleep when I wrote that - cheers for pointing it out!
Try this instead - I've just tested it here and it appears to work!
(?!BIN\$).*
Thank you this helps :)
Steve Wrote
I need to exclude some tables, because in our testing database there are like 30 tables with strange names like "BIN$QGKrW0b/UrXgQDg5xlFNTw==$0" which I can't normally see but the data source dialog will somehow discover them. On data source refresh button I get an error (see image file) because the table name contains some slashes.
These table names are created by Oracle when you drop a table, you need to empty the Oracle recycle bin to remove them. They exist to allow Flashback recovery of a dropped table.