Hi! I've extended my demo repository, andreas5588/demo-dbs-iris, to make it easy to test the FOREIGN SERVER and FOREIGN TABLE features in IRIS.
To achieve this, I created a namespace called FEDERATION
. The idea is as follows:
- Set up JDBC connections for each namespace.
- Create a FOREIGN SERVER within the FEDERATION namespace for each connection.
- Define a FOREIGN TABLE a least for one table based on each foreign server.
The Script: demo-dbs-iris/src/sql/02_create_foreign_server.sql.png)
IRIS does not support executing SQL statements that combine tables from different namespaces. To address this limitation, this federated namespace leverages the concept of creating foreign servers to include other namespaces. By defining foreign tables, it becomes possible to seamlessly combine tables across namespaces, allowing users to write SQL statements that unify data into a single query. This namespace is used to explore this feature, serves as a practical demonstration of this capability, showcasing how to explore and utilize it.
Run this demo container directly via:
docker pull andreasschneiderixdbde/demo-dbs-iris:latest
After that you can do queries like that:
.png)
Have fun testing and improving the demo
Andreas
.png)