QuestDB via PostgreSQL Source Shows No Tables

Hello,

I’m trying to connect QuestDB to Dremio using the PostgreSQL source (since QuestDB is PostgreSQL-compatible). The connection test succeeds, but no schemas or tables appear in Dremio, even though the database contains tables.

Could you please advise if PostgreSQL is the correct connector and whether any additional configuration is required?

Thank you,

@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:

  1. 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);
  }
}
  1. Create QuestDBConf.java - the source configuration class

  2. Create questdb-arp.yaml - ARP file with type mappings

  3. Create questdb-layout.json - UI configuration

  4. 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:

  • File a feature request with QuestDB

  • Check if newer versions have added pg_catalog support

Summary

Option Effort UI Browsing? Query Data?
External Query None :cross_mark: No :white_check_mark: Yes
Custom ARP Plugin High (dev work) :white_check_mark: Yes :white_check_mark: Yes
Wait for QuestDB pg_catalog None Depends on QuestDB Depends

For immediate use, External Query is the only viable path without code changes

1 Like