Failed Field filter on GUID column is SQL Server

Hi,

I was trying to create a field filter to filter table's ID column, but in preview I see that filtered string casted to type uuid that doesn't exist in SQL Server, that should be uniqueidentifier.

My version is 0.46.1.

Error message

Query preview:

select AccountId
from Api_Users
where "dbo"."Api_Users"."accountId" IN (CAST('6e72ce89-74f0-4dc5-98d6-0024917533ea' AS uuid))

thanks, can you provide us with repro steps?

Prequirestitions:

  • DB – Azure SQL Server
  • Metabase version – 0.46.1

Here steps is:

  1. Start SQL Query
  2. Put query text
  3. Add {{filter}} prompt and choose Variable Type Filed filter, Field to map to choose field with Metabase type Entity key and data type uniqueidentifier
  4. Choose any value from filter
  5. Start query
  6. Get an error

Gotcha, and can you send the ddl of the table?