- Overview
- Tutorials
- Getting started
- Get started with Canton and the JSON Ledger API
- Get Started with Canton, the JSON Ledger API, and TypeScript
- Get started with Canton Network App Dev Quickstart
- Get started with smart contract development
- Basic contracts
- Test templates using Daml scripts
- Build the Daml Archive (.dar) file
- Data types
- Transform contracts using choices
- Add constraints to a contract
- Parties and authority
- Compose choices
- Handle exceptions
- Work with dependencies
- Functional programming 101
- The Daml standard library
- Test Daml contracts
- Next steps
- Application development
- Getting started
- Development how-tos
- Component how-tos
- Explanations
- References
- Application development
- Smart contract development
- Daml language cheat sheet
- Daml language reference
- Daml standard library
- DA.Action.State.Class
- DA.Action.State
- DA.Action
- DA.Assert
- DA.Bifunctor
- DA.Crypto.Text
- DA.Date
- DA.Either
- DA.Exception
- DA.Fail
- DA.Foldable
- DA.Functor
- DA.Internal.Interface.AnyView.Types
- DA.Internal.Interface.AnyView
- DA.List.BuiltinOrder
- DA.List.Total
- DA.List
- DA.Logic
- DA.Map
- DA.Math
- DA.Monoid
- DA.NonEmpty.Types
- DA.NonEmpty
- DA.Numeric
- DA.Optional
- DA.Record
- DA.Semigroup
- DA.Set
- DA.Stack
- DA.Text
- DA.TextMap
- DA.Time
- DA.Traversable
- DA.Tuple
- DA.Validation
- GHC.Show.Text
- GHC.Tuple.Check
- Prelude
- Smart contract upgrading reference
- Glossary of concepts
Participant Query Store (PQS)¶
PQS is a component that ingests ledger data into a PostgreSQL to make it available for querying using SQL.
Note
Throughout this document you may see references to PQS
and scribe
. The distinction between them is:
PQS
is the name of the component that provides the capability to query a Daml ledger using SQL
scribe
is the technical name of the executable that implements this capability
Overview¶
PQS provides scalable read access for a participant by exposing its data via SQL leveraging existing tools and knowledge.
The participant’s primary role is to submit and propagate transactions in the network, which requires interaction to submit commands. PQS works in this domain to monitor transactions on a streaming basis, maintain history and state based on these events, and makes the resultant data available for users to query. It allows independent scaling of the read loads, depending on the capacity required.
PQS enables the following key capabilities:
To make the Daml ledger queryable via SQL
Allow querying on a point-in-time or latest-available basis
Filter the scope by Daml party and contract template
Embed an API within the database to allow consumers to easily access the ledger data by:
Using familiar Daml identifiers (eg.
mypackage:My.Module:MyTemplate
) instead of PostgreSQL approximationsUsing SQL to perform familiar aggregations, transformations and joins
Creating custom indexes to optimize queries
Facilitating access to both state (contracts) and audit trail (events) perspectives
Crash-tolerance so it can be restarted safely
Contribute¶
Please, visit https://discuss.daml.com/tag/pqs to ask questions and raise attention to use-cases motivating feature requests.