Field filters invalid queries

Running a metabase local via docker and the database is a postgres hosted on GCP

For very simple filed filters, all my tables are facing the same error , tested on multiple variables/tables and the exact same error, not sure what's going wrong. Here's an example with 1 table and variable

Example 1 :

select * from liq_market
where {{market}}

ERROR: invalid reference to FROM-clause entry for table "liq_market" Detail: There is an entry for table "liq_market", but it cannot be referenced from this part of the query. Position: 151

field filter & category chosen as per docs and string type here

Incidentally, the query preview shows this and the error is same in a sql

select * from liq_market
where ("dbt_prod"."liq_market"."market" = 'ETH_USDT')

Alternate fix - Now, this seems to work when I change it to a "Text" filter and works fine

select * from liq_market
where market = {{market}}

However, I woukd like to use field filters to scale this better.
Is there a setup issue? Is the dbt prod being added into the query causing issues? (as shown in query preview)

Hey pks

Since this is failing:

select * from liq_market
where ("dbt_prod"."liq_market"."market" = 'ETH_USDT')

Have you already tried referencing the full schema in the FROM clause?

SELECT *
FROM "dbt_prod"."liq_market"
WHERE {{market}}
SELECT *
FROM "dbt_prod"."liq_market"
WHERE market = 'ETH_USDT';
1 Like

It apparently was that simple, yes indeed. thank you @Filmon ! : )