In Bigquerym, how to find a text in a column based on another table and column

Asked

Viewed 29 times

-4

I made the example below with a blocklist table (where I have all the words that cannot appear in a product description). The product table, where I want to find these blocklist words in the product description.

with blocklist as (

    select 'instagran' as blocklist union all
    select 'facebook' as blocklist union all
    select 'whatsapp web'
),
products as (

    select 'seller1' as seller, 'Tenis Nike 43 call me on instagram or facebook'    as product union all
    select 'seller1' as seller, 'TV 42 sansung link whatsapp WEB or INSTAGRAM'      as product union all
    select 'seller2' as seller, 'TV 42 sansung link'                                as product

)
select
     seller
    ,product
    ,blocklists
from
    ?

I wanted to revisit a list of terms I found in each product description.

seller product blocklists
seller 1 Tennis Nike 43 call me on instagram or facebook instagram,facebook
seller 1 TV 42 Sansung link Whatsapp WEB or INSTAGRAM Whatsapp web,instagram
seller 2 TV 42 Sansung link null

I need to transform blocklist into array, use regex to put in select?

  • Hello. This version of Stack Overflow should be used for questions and answers on portuguese. Please translate your question or ask it on https://stackoverflow.com.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.