How it works

ClickHouse holds a copy of the Pennylane tables that Data Sharing exposes. Your queries hit a read-only endpoint. They do not run on the database that serves the Pennylane application.

Databases

Database Use it for
pennylane Reads and reporting. Live rows. Default database.
etl Incremental loads. Same tables, plus deleted_at and synchronized_at.
practice_management Firm portfolio. Firm users and Pennylane employees only. See Practice management.

companies_identification, timesheet_entries, and general_ledger_revision are in practice_management. Who sees which rows is on that page.

What a query returns

You connect as u_<id>. The warehouse applies your Pennylane company rights before it returns rows. Two users running the same SQL can see different companies. They always see the same columns.

pennylane drops deleted rows. etl keeps them and sets deleted_at. A row removed because the company is draft, archived, or unknown also disappears from etl, with no deleted_at. Follow those cases from etl.companies.

Performance

Each table page publishes its sorting key. The filter has to start with that key.

On general_ledger and analytical_ledger the key is company_id, then id. A minmax index on date helps a little after that. It does not replace company_id.

For a fleet ledger, run one query per company_id, or a batch of company_id. Do not run one query with no company filter.

SELECT id, date, debit, credit
FROM pennylane.general_ledger
WHERE company_id = 123456
  AND date >= '2026-01-01'
SELECT id, date, debit, credit
FROM pennylane.general_ledger
WHERE company_id IN (123456, 123457, 123458)
  AND date >= '2026-01-01'

Same shape for analytical_ledger. Do not SELECT *.

Freshness

Data is available within 2 hours of the change in Pennylane. That is the freshness SLA.

Creating the user can still take a few hours. That delay is separate from table freshness.

What is not on this site

Internal pipeline tables are not queryable with a Data Sharing user and are not documented here.


Back to top