Is there a way to point a foreign key to a table in other Db

I have two databases on one server. Is there a way to associate a foreign key in db1.table1 with the primary key in db2.table2?

Hi @dickovan
Currently (0.32.9) Metabase doesn’t allow association/connections/queries across databases. You would need to consolidate your databases in a single source.
Go and upvote by clicking :+1: on the first post:
https://github.com/metabase/metabase/issues/3953

You could access the multiple databases as one:

1 Like

Or depending on the size/complexity of the data needed you can combine disparate data sources using something like PrestoDB. That has its own pros and cons, but PrestoDB will be faster than linked databases at least in SQL Server 2016.

The cons are mostly that you’ll have to refer to their SQL reference and you’ll want to do a bit of reading to take advantage of it.