Looks basic, need help to understand sql query in grafana

Hi,
I see one of the panel we have where condition in the select as mentioned below:


where 
  $__timeFilter(ts) 
  and ('*' = $Advertiser or adv_id = CAST($AV as INT64))
  and ('*' = $OSN or osid = lower($OSN) )
  and ('*' = $Country or country = lower($Country) )

Can anyone please tell me the meaning of ('*' = , which column or data it is going to refer to.
Is that the column refers to the variable?

Welcome

What data source is this being ran against. Most unusual query, unless there is a column named *

thanks yosiasz
it is referring to bigquery and there is no column named as “*”

Doesn’t this just mean that the query is looking to see whether the variable
supplied as $Advertiser is equal to a literal asterisk, etc?

Antony.

for example:
lets take the below query

select column1,adv_id  
where 
  $__timeFilter(ts) 
  and ('*' = $Advertiser or adv_id = CAST($AV as INT64))
from table1;

variable has query like this:
Advertiser=select advi_id from Advertiser

what is possible with this?
* = referring to which column1 or adv_id or don’t think of both
* = how come this can refer to variable output’s if it has more then one value’s.

I can use * = something in any general query, but didn’t make out if that is correct output.

It will be great helpful if i get any suggestion or hit for this. Thanks

one google search later, first link
you can se here : wildcard can be used in big query table_name