Replicate LIKE condition

I want to replicate the ‘LIKE’ condition in SQL in an expression in DQC. Is there a way to do it? Would 'VARIABLE = ‘%STRING%’ work as LIKE?

Hi Amey,

I would suggest using ‘matches’ expression to verify whether the string matches the pattern. The syntax should look like this

matches ( string srcRegex , string srcStr [, boolean caseInsensitive{{=false}}])

You can find details in the Help section.

For instance:

matches(".*01", column_name)

, where (.*) matches any char zero or more times.

Kind regards,
Victoria

Amey,

string multiplication expression using “containsWord” is another way if you don’t have regrex expressions.

containsWord( string srcStr , string srcWord, string separator =" "])

Regards
Srini.

Thank you Srinivas. Contains word worked for my use case.