How to Use External PostgreSQL Plugin - Syncing Tables and Linking to Main Database

I have successfully installed the External PostgreSQL plugin and connected it to an external database.

My expectation was that this external database would behave similarly to the ‘main’ NocoBase database. Specifically, I thought that when I created a new table directly in the external PostgreSQL database (using a SQL client), NocoBase would automatically detect this table, create a corresponding collection, and expose an API for it.

This does not seem to be the case. The new tables are not appearing in the NocoBase UI.

:question: Core Questions

  1. How to synchronize external tables? What is the correct process to make existing or new tables from the external PostgreSQL database visible and usable as collections within NocoBase?
  2. How to link internal and external bases? How can I create relationships between a collection from my external database and a collection from the main NocoBase database?

:dart: Example Use Case

My primary goal is to use data from the external database but leverage the existing user management features of NocoBase.

For example, I want to have a reports table in my external database. I need to link this reports table to the users, roles, and departments collections from the main NocoBase database to manage permissions and associations.

Could you please provide documentation or steps on the correct workflow for (1) importing external tables and (2) creating relationships between different database sources?

Thank you for your help.

  1. click on Refresh button in the settings → data sources specific to your external data source
  2. not sure; looks like relationships are within the same data source

Hi, the “Refresh” button in the upper right corner of the external data source is for synchronous refresh and does not currently support cross-data source association.