Is the intended outcome to be able to SELECT tables that live in a database outside of osquery? You can create an extension that
1. connects to your database
2. enumerates the tables
3. creates a new table plugin for each discovered table
4. when a query happens in the extension, it is forwarded to the external database