PQS ascertains its configuration from the following sources, in order of priority:Documentation Index
Fetch the complete documentation index at: https://docs.canton.network/llms.txt
Use this file to discover all available pages before exploring further.
- HOCON configuration files (
--configargument) - command-line arguments
- Java system properties (
-Darguments tojavacommand) - environment variables
Consult the command
./scribe.jar pipeline --help-verbose for further information on individual configuration items, and the conventions used to specify them in the above forms.
The following command connects to a non-auth ledger and replicates the latest state of the ledger (excluding prior-history) from the perspective of the supplied Daml party. It uses the ledger source and supplied database:
pqs-references-configuration-options how to configure each command.
Transactions data source
To understand how PQS stores data, you need to understand theda-ledgers. In simple terms, the Daml ledger is composed of a sequence of transactions, which contain events. Events can be:
- Create: creation of contracts / interface views / divulgences
- Exercise: of a choice of contracts / interface views
- Archive: end of the lifetime of contracts / interface views
PQS can run in two modes as specified by the
--pipeline-datasource configuration. The following table shows the differences between the two modes, in terms of data availability via the respective SQL functions:
| Data / Mode | TransactionStream | TransactionTreeStream |
|---|---|---|
creates() of contracts | ✓ | ✓ |
exercises() on contracts | ✗ | ✓ |
archives() of contracts | ✓ | ✓ |
creates() of interfaces | ✓ | ✓ |
exercises() on interfaces | ✗ | ✓ |
archives() of interfaces | ✓ | ✓ |
creates() of divulgences | ✗ | ✓ |
| Transient (create-archive in a transaction) | ✗ | ✓ |
| Stakeholders & witnesses | ✓ | ✓ |
| Choice controllers | ✗ | ✓ |
| Note | ||
| Default | ✓ | ✗ |
| Data size | Smaller | Larger |
Contract filtering
--pipeline-filter-contracts specifies a filter expression to determine which the Daml templates, interface views and choices to include. A filter expression is a simple wildcard inclusion (*) with basic boolean logic (& ! | ( )), where whitespace is ignored. For example:
*: everything (default)pkg:*: everything in this packagepkg@=1: everything in this package that has major version1.x.xpkg@>=1.2.3: everything in this package starting with version1.2.3inclusivelyfoo@1.2.3|bar@3.2.1: everything in pinpointed packagesfooat version1.2.3and packagebarat version3.2.1pkg:a.b.c.Bar: just this one fully qualified name for templateBara.b.c.*: all members of thea.b.cnamespace* & !pkg:a.b.c.Bar: everything except this one fully qualified name(a.b.c.Foo | a.b.c.Bar): these two fully qualified names(a.b.c.* & !(a.b.c.Foo | a.b.c.Bar) | g.e.f.Baz): everything ina.b.cexcept forFooandBar, and also includeg.e.f.Baza.b.c.Foo & a.b.c.Bar: error (the identifier can’t be both)
There are further conditions placed upon the filtering of templates and interfaces to avoid potential ambiguity. It is required to include any filter for:
- All interface views of included templates
- All templates of included interface views
Party filtering
Similarly, the--pipeline-filter-parties option specifies a filter expression to determine which parties to supply data for. For example:
*: everything (default)Alice::* | Bob::*: any party with anAliceorBobhintAlice::122055fc4b190e3ff438587b699495a4b6388e911e2305f7e013af160f49a76080ab: just this one party* & !Alice::*: all parties except those with anAlicehintAlice* | Bob* | (Charlie* & !(Charlie3::*)):AliceandBobparties, as well asCharlieexceptCharlie3
--pipeline-filter-parties cannot be used to access data for parties for which the user is not authorized.
Explicit contract disclosure
--pipeline-filter-metadata specifies an inclusion filter expression to determine the Daml templates and interface views to capture metadata for. Same syntax as section above applies. Captured data will be available in the metadata column (bytea PostgreSQL type) in the query functions output. This column stores the contents of created_event_blob (see stakeholder-contract-share) from the respective event.
JSON encoding configuration
By default PQS stores the payloads in JSON format using strings for numeric types. This is the default because numbers in JSON are backed by double-precision floating point numbers, which can lead to loss of precision for large integers. If you want to store numbers as integers and can tolerate loss of precision in numbers, you can use the--target-encoding-numericasstring and --target-encoding-int64asstring options to change the default behavior.
Another option allows to store nullable fields as JSON nulls instead of omitting nullable fields from the records. PQS stores nullable fields as JSON nulls by default, but you can change this behavior using the --target-encoding-excludenulls option.