No matching signature for operator = for argument types: STRING, TIMESTAMP

Hi Team,

I tried to make dashboard by using SQL query, I made two dashboard, finished one without any problem but the other one gave me an error even though the query construct is pretty much similar.

Here's the part of the query that gave me an error:

SELECT
*
FROM data
WHERE rank_number <= 10
AND merchant_source = {{merchant_source}}
ORDER BY merchant_source, rank_number

This is the error it gave me:

400 Bad Request POST https://www.googleapis.com/bigquery/v2/projects/dataset/queries { "code" : 400, "errors" : [ { "domain" : "global", "location" : "q", "locationType" : "parameter", "message" : "No matching signature for operator = for argument types: STRING, TIMESTAMP. Supported signature: ANY = ANY at [80:5]", "reason" : "invalidQuery" } ], "message" : "No matching signature for operator = for argument types: STRING, TIMESTAMP. Supported signature: ANY = ANY at [80:5]", "status" : "INVALID_ARGUMENT" }

When I tried to take out the 'AND merchant_source' filter, the query worked.

I noticed that it says that the left part of the filter is STRING while the right one is TIMESTAMP, however I don't think it's a timestamp at all, and again the same filter worked well in my other dashboard.

Could you please help? Thanks

Hi @minumtehkotak
I don't which variable type {{merchant_source}} is, but if it is a Field Filter, then it should just be:
AND {{merchant_source}}
Please read this: https://www.metabase.com/learn/sql-questions/field-filters

Hi @flamber, thanks for the response.

The type is actually TEXT. I also use this in another similar dashboard and works, for this I don't know why it doesn't.

Thanks

@minumtehkotak Post "Diagnostic Info" from Admin > Troubleshooting.

I don't understand why it is somehow turning your Text variable into a timestamp. I've never seen that before.
Try recreating your question and add it to a new dashboard with only that question and a single filter.