@usual1suspect2 It could be possible that QuestDB has minor modifications and does not use the same query PG uses to populate schemas and tables. Dremio sends a query to pg_tables and pg_views to populate this. Can you check if in QuestDB they exists?
Checking with ChatGPT and augmentAI, indeed that is the answer
QuestDB implements the PostgreSQL wire protocol for client connectivity, but it’s not a full PostgreSQL implementation - it’s a time-series database with its own internal architecture.
pg_tables is a PostgreSQL system view (pg_catalog.pg_tables). QuestDB is not built on top of PostgreSQL—it’s its own engine that speaks the PostgreSQL wire protocol (PGWire) so Postgres clients can connect, but it doesn’t automatically include all Postgres system catalogs/views.
On your specific question: pg_catalog.pg_tables is (at least historically, and per QuestDB’s own issue tracker) not implemented, and attempts to query it can fail with errors like “table does not exist [name=pg_catalog.pg_tables]”.
What to use instead in QuestDB
To list tables / metadata in QuestDB, use QuestDB-native metadata features:
-
SHOW TABLES;
-
SHOW COLUMNS FROM your_table;
-
SELECT * FROM tables(); (table function returning table metadata)
-
SELECT * FROM table_columns('your_table'); (column metadata
There a few options you can try
Option 1: External Query (Workaround - No UI browsing)
Since the PostgreSQL source can connect to QuestDB (connection works), you can use External Query to query tables directly without needing schema discovery:
SELECT * FROM TABLE(questdb_source.external_query('SELECT * FROM tables()'))
Or to query actual data:
SELECT * FROM TABLE(questdb_source.external_query('SELECT * FROM my_table'))
This bypasses the schema/table listing entirely.
Option 2: Create a Custom QuestDB ARP Plugin (Requires Code)
This would require building a custom Dremio plugin. Here’s what it would look like:
To create a QuestDB connector, you’d need to:
- Create
QuestDBDialect.java - extending the PostgreSQL dialect but with a custom schema fetcher:
public class QuestDBDialect extends PostgreSQLDialect {
@Override
public ArpSchemaFetcher newSchemaFetcher(JdbcPluginConfig config) {
// Use QuestDB's tables() function instead of pg_catalog
final String query =
"SELECT NULL AS CAT, 'public' AS SCH, table_name AS NME FROM tables()";
return new ArpSchemaFetcher(query, config);
}
}
-
Create QuestDBConf.java - the source configuration class
-
Create questdb-arp.yaml - ARP file with type mappings
-
Create questdb-layout.json - UI configuration
-
Register it as a source type
Option 3: Ask QuestDB to implement pg_catalog compatibility
This is actually an ongoing issue in the QuestDB community. Users have requested PostgreSQL catalog compatibility for tools like Tableau. You could:
Summary
| Option |
Effort |
UI Browsing? |
Query Data? |
| External Query |
None |
No |
Yes |
| Custom ARP Plugin |
High (dev work) |
Yes |
Yes |
| Wait for QuestDB pg_catalog |
None |
Depends on QuestDB |
Depends |
For immediate use, External Query is the only viable path without code changes