Hey everyone,
I've tried using Metabase with an existing web app that stores its data in a Postgres database and I'm having some issues when it comes to querying a table based on the value of a field with a custom data type.
Our setup:
We run the latest version of Metabase in the Docker container that Metabase provides. Our Metabase database is a Postgress DB of the same version as the app's Postgres. The app's Postgres is added as a data source in Metabase.
The error:
When querying a table based on the value of a field with a custom array type (our "Roles" field) we get this error:
ERROR: operator does not exist: "Role"[] = character varying Hint: No operator matches the given name and argument types. You might need to add explicit type casts. Position: 371
This is how the roles field is created in our app's database:
ALTER TYPE "Role" ADD VALUE 'Admin';
ALTER TYPE "Role" ADD VALUE 'Support';
-- AlterTable
ALTER TABLE "User" ADD COLUMN "roles" "Role"[] DEFAULT ARRAY['Basic']::"Role"[];
I know this is probably a very special case I'm running into here, but anyone got any ideas as to how to make this work?