Creating a filter from a query - not by selecting from the current schema

I have a situation where the data I want to filter by (and that I’m pulling) is all coming from a linked server. I’m able to successfully use the linked server by using fully qualified schema strings but I’m not able to get to the linked server for a field filter b/c the field filters require that you select from the schema in the current database.

For example, I’d like my dropdown to display several different task statuses. This simple query displays the list I’d like to filter with.

FROM LinkedServer.database.dbo.Taskstatus

Is there any way to accomplish this using metabase?


Hi @thad
Currently no. The Field Filter is referencing the schema.table.column you set in the sidebar.
Could you have different Field Filters for each schema, or do you have too many schemas?

The issue is that metabase requires that I’m in the current database/schema to pull from a table for a filter. It does not require this to pull data from a linked server if you fully qualify your call.

I need to be able to make a filter out of a query’s resultant dataset instead of pulling from a lookup table in the current schema.

I guess another way would be if someone can show me how to add as a database a linked server connection and I could pull from the remote servers that way.


I figured out a work-around by creating a view. To see the new view I refreshed the DB under Admin/Databases. The final step (which didn’t seem like it should be necessary) was a ctrl+F5 on the schema page and the question page so the new views would show up.

Metabase only syncs every hour (and scans every night) by default, so if you make changes and need to see them instantly, then you need to manually re-sync/scan.
The refresh of the browser is a known issue - there’s actually a handful issues open about it - and there’s work being done to try to make Metabase automatically reload data, when it’s outdated.