here is an example of a query where i want to identify the brand of a product given its productName, knowing that the products belong to an account whom I know a list of potentiel possible brands.
extract_pattern(products.productName, accounts.brand_pattern, 0, ‘CAPTURE_GROUP’) AS brand_found
inner join account_brands on products.account_id = account_brands.account_id
products.productName is not null
for instance brand pattern can be something such as ‘.(\b(Apple|Samsung|Huawei)\b).’
There query results in an error :
IllegalArgumentException: The argument ‘pattern’ of Function ‘extract_pattern’ has to be constant!
Query profile associated :
3dff27cb-56c7-4ca6-ab5e-e1cb9d5d402f.zip (9.9 KB)