I have this query that runs in Redshift:
Select A.*
From TableA A
join TableB B
on A.Col like B.Pattern
Where the Pattern
column in TableB
looks like:
('%foo%', '%bar%', ...)
TableB
has hundreds of pattern rules and is used in several locations to its easier and cleaner to maintain one table of string rules.
Is there a way to use similar to
instead of like
in the join
condition in Redshift? I.e.
Select A.*
From TableA A
join TableB B
on A.Col similar to B.Pattern
When I try the above query, I get this error:
Specified types or functions (one per INFO message) not supported on Redshift tables.
2
Answers
Works fine for me:
The problem you have is that one of your tables is on the leader node and is using leader-node only data types, and so cannot participate in a query which recruits worker nodes (which do not know about these types).
I may be wrong, but it may be you need an introduction to the basics of Redshift. Have a look at this;
https://www.redshiftresearchproject.org/white_papers/downloads/introduction_to_the_fundamentals_of_amazon_redshift.html