/** * QuestDB exporter — pulls data via signalk-questdb's HTTP route. * * The signalk-questdb plugin exposes: * GET /plugins/signalk-questdb/api/full-export/tables → { tables: [...] } * GET /plugins/signalk-questdb/api/full-export/?from=&to= → parquet stream * * Both are served by SignalK in-process, so we reach them via plain HTTP * over loopback. No container exec, no shared filesystem ownership issues. * * For each table we partition the export by ISO week into one parquet * file per week. Closed weeks become byte-identical across export cycles * and dedup perfectly in kopia. The current ("open") week plus a small * rolling churn window get re-exported each cycle to absorb late arrivals. * * Streams the response body directly to a temp file in the shard's * directory, then atomically renames into place — so a snapshot * mid-export never sees a half-written parquet. */ import type { DatabaseExporter, ExportResult } from './types.js'; export interface QuestDBExporterOptions { signalkBaseUrl?: string; log?: (msg: string) => void; /** Override fetch (tests). */ fetch?: typeof fetch; /** Override "now" (tests). */ now?: () => Date; } export declare class QuestDBExporter implements DatabaseExporter { readonly pluginId = "signalk-questdb"; private readonly baseUrl; private readonly fetchImpl; private readonly nowImpl; constructor(opts?: QuestDBExporterOptions); private readonly log; detect(): Promise; exportAll(stagingDir: string): Promise; private listTables; private exportTable; /** * If the staging dir has a `
.parquet` directly (pre-partitioning * layout), move it aside to `
.parquet.legacy`. Idempotent. */ private migrateLegacyFlatFile; /** * Earliest week recorded in a manifest, or null if no shards exist. * Pure helper, no I/O — manifest is already read by the caller. */ private earliestWeekFromManifest; private churnCutoffWeek; private exportWeekToShard; } //# sourceMappingURL=questdb.d.ts.map