🌱 Orchard is an early preview — connector details below are illustrative while we iterate.
🛰️

Federation

HostQuery

Register remote Postgres, MySQL, and other hosts once, then query them — and join across them — from a single DuckDB session.

Beta Subscription By Query.Farm Rust worker

Pricing

From $99/mo

Subscription plan

Subscribe ← Back to the Orchard

Overview

What HostQuery does

HostQuery is a federation worker. Register a set of remote database hosts with the worker and each becomes an attachable schema. DuckDB can then read from them, push down filters and projections, and join results across hosts that could never talk to each other directly.

The worker handles connection pooling, credential storage, and dialect translation, so a single SQL query can span a production Postgres replica, an analytics MySQL box, and a local Parquet file at once — without an ETL hop in between.

Highlights

  • Register many remote hosts as one catalog
  • Predicate and projection push-down per host
  • Cross-host joins from a single session
  • Connection pooling and credential isolation
  • Postgres, MySQL, and ODBC-speaking hosts

Attach & query

hostquery.sql
-- Attach the HostQuery federation worker
ATTACH 'hosts' AS hq (
  TYPE vgi,
  LOCATION 'https://orchard.query.farm/hostquery',
  TOKEN getenv('ORCHARD_TOKEN')
);

-- Join a Postgres replica against an analytics MySQL host
SELECT o.id, o.total, c.segment
FROM hq.pg_prod.orders     AS o
JOIN hq.mysql_analytics.customers AS c USING (customer_id)
WHERE o.created_at > now() - INTERVAL 1 DAY;

Requires the VGI extension. Set ORCHARD_TOKEN after subscribing.

What you get

Tables & functions it exposes

Once attached, the connector adds these objects to your SQL session.

Table
hostquery.hosts

Registered hosts and their reachability.

Function
remote(host, sql)

Run a statement on a specific host and stream rows.

Macro
h(host, table)

Shorthand to reference a remote host’s table.

Secret
host_credentials

Per-host connection secrets.

Use cases

What teams build with HostQuery

Join a production replica with an analytics database live.

Query many regional shards as if they were one table.

Pull a reference table from another team without exporting it.

Ready to attach HostQuery?

Subscribe in minutes, or talk to us about a custom connector for your stack.