Ead_parquet() ignores cairo.sql.copy.root and always reads from cairo.sql.copy.export.root

Hello QuestDB team,

While testing read_parquet() on QuestDB 9.1.1 (Build a266bb9…), I noticed it only works when the Parquet file is under cairo.sql.copy.export.root, even though the docs state it should honor cairo.sql.copy.root.

Steps to reproduce

  1. Set in server.conf:

    cairo.sql.copy.root = G:/Code/etf_booster/staging
    cairo.sql.copy.export.root = G:/Code/etf_booster/exports

  2. Place 20251024.parquet under G:/Code/etf_booster/staging/minute_baseline/2025/.

  3. Run:

    INSERT INTO market_data_minute
    SELECT * FROM read_parquet('minute_baseline/2025/20251024.parquet');

  4. QuestDB responds with

    error reading parquet file [...] file does not exist:
    G:\Code\etf_booster\exports\minute_baseline\2025\20251024.parquet

If I copy the same file into G:/Code/etf_booster/exports/minute_baseline/2025/ the query succeeds, confirming the function is looking at copy.export.root regardless of copy.root.

Expectation

read_parquet() should respect cairo.sql.copy.root (as documented) so that downloading/import workflows can keep staging data separate from export artifacts. Otherwise we need to duplicate every Parquet file into the export directory, which defeats the purpose of configuring distinct roots.

Could you confirm whether this is a bug or an intentional design? If intentional, please update the documentation; if not, is there a workaround to force read_parquet() to honor copy.root?

Thanks!

Let me look into this. The check that I can see does indeed check input root (and it works fine for me)

@mmzz Can you share the output of:

(SHOW PARAMETERS) WHERE property_path LIKE '%root%';

Please?

@nwoolmer It was my mistake — I edited server.conf but never restarted QuestDB, so both cairo.sql.copy.root and cairo.sql.copy.export.root kept pointing to the same directory. After restarting, they diverged as expected. Here’s the SQL I ran to verify:
(SHOW PARAMETERS)
WHERE property_path IN (‘cairo.sql.copy.root’,‘cairo.sql.copy.export.root’);

Result:

  • cairo.sql.copy.root = G:/Code/etf_booster/staging
  • cairo.sql.copy.export.root = G:/Code/etf_booster/exports

Thanks again for the help!

No problem! Let us know if you encounter any other trouble :slight_smile: