Skip to content
Advertisement

Tag: snowflake-cloud-data-platform

how to Join array with string in Snowflake

I have two tables: Books with column tag_ids (Array) Tags with column tag_id (Varchar) I have a visualisation tool that need to join these tables together. The only thing that I can control over is the join condition. the problem is that I can’t find a way to make this join work. this is what I tried: This works only

snowflake substring by pattern

I have a string column in my table as below: i need a dynamic way of only extracting 123456 from these string. Can you plz suggest a solution. Answer Use the REGEXP_SUBSTR(…) built-in function to extract substrings using a regular expression pattern. If there will only be one number in each column value, a number pattern or a numeric characters

OR clause takes longer time

I have a query as an example below, but its running forever .. If I do union then I have copy entire large query .. Any help on this fix Answer The inner part can be written using the QUALIFY clause like so: which can be pushed into a CTE like: which means you can union that whole thing or

Advertisement