How To Guides

How to use Reports from CLI

Learn how to use Reports from the minka CLI tool.

You should have already set up the BQRB bridge in your ledger by following How to set up BigQuery Reporting Bridge and enabled some reports using How to enable BQRB reports.

Viewing report types

To view available report types, you need to check which report schemas are available. You can do that by running:

$ minka schema list -l 100

╔══════════════════════╤══════════════════════╤══════════════════════╗
║ Handle               │ Record               │ Custom               ║
╟──────────────────────┼──────────────────────┼──────────────────────╢
║ trans_details_rep    │ report               │                      ║
╟──────────────────────┼──────────────────────┼──────────────────────╢
║ ledger_movement_rep  │ report               │                      ║
╟──────────────────────┼──────────────────────┼──────────────────────╢
║ ledger_participants_ │ report               │                      ║
║ rep                  │                      │                      ║
╟──────────────────────┼──────────────────────┼──────────────────────╢
...
╟──────────────────────┼──────────────────────┼──────────────────────╢
║ status               │ policy               │ description: Schema  ║
║                      │                      │ created by ledger fo ║
║                      │                      │ r status policies    ║
╚══════════════════════╧══════════════════════╧══════════════════════╝

Showing page 1 (additional pages may be available.).

As you can see, we have schemas for the report record which correspond to different report types.

Creating reports

If we want to create one of the reports from the list, we can run the command below. Note that you will need to know which parameters need to be provided. You can find those out in the report layout files.

$ minka report create
? Handle: 467VQuW3eu53er0lwqg7o
? Schema: ledger_participants_rep
? Add custom data? Yes
? Field class: string
? Field title: start_timestamp
? Field value: 2025-09-01T00:00:00.000Z
? What do you want to do next? Set another field
? Field class: string
? Field title: end_timestamp
? Field value: 2025-09-06T00:00:00.000Z
? What do you want to do next? Finish adding fields
? Signer: owner
? Signer password for owner [hidden]

✅ Report created successfully:

Report summary:
---------------------------------------------------------------------------
Handle: 467VQuW3eu53er0lwqg7o

Schema: ledger_participants_rep

Custom:
  - end_timestamp: 2025-09-06T00:00:00.000Z
  - start_timestamp: 2025-09-01T00:00:00.000Z

Status: created


Access rules:
#0
  - Action: any
  - Signer:
    - public: aeblUjUYsPlYsWzWfajZIExO2Dz5NVbX2RRDpiiTwrc=

Handle: owner
Public: aeblUjUYsPlYsWzWfajZIExO2Dz5NVbX2RRDpiiTwrc=

Listing reports

To list existing reports, we can do the same as we would with any other Ledger record.

$ minka report list

╔══════════════════════╤══════════════════════╤══════════════════════╗
║ Handle               │ Schema               │ Custom               ║
╟──────────────────────┼──────────────────────┼──────────────────────╢
║ 467VQuW3eu53er0lwqg7 │ ledger_participants_ │ end_timestamp: 2025- ║
║ o                    │ rep                  │ 09-06T00:00:00.000Z  ║
║                      │                      │ start_timestamp: 202 ║
║                      │                      │ 5-09-01T00:00:00.000 ║
║                      │                      │ Z                    ║
╚══════════════════════╧══════════════════════╧══════════════════════╝

Showing page 1 (additional pages may be available.).

Viewing report metadata

To see the report that you just created, you can use the command below:

$ minka report show 467VQuW3eu53er0lwqg7o

Report summary:
---------------------------------------------------------------------------
Handle: 467VQuW3eu53er0lwqg7o

Schema: ledger_participants_rep

Custom:
  - end_timestamp: 2025-09-06T00:00:00.000Z
  - start_timestamp: 2025-09-01T00:00:00.000Z

Status: pending


Access rules:
#0
  - Action: any
  - Signer:
    - public: aeblUjUYsPlYsWzWfajZIExO2Dz5NVbX2RRDpiiTwrc=

If you are fast enough and it's still being created, you will notice that it's in the pending status. This means that the reporting bridge is working on the report. Initially when the report was created, it was in the created status. In a few moments it will be completed which you can check by running the same command again after a few moments.

$ minka report show 467VQuW3eu53er0lwqg7o

Report summary:
---------------------------------------------------------------------------
Handle: 467VQuW3eu53er0lwqg7o

Schema: ledger_participants_rep

Custom:
  - end_timestamp: 2025-09-06T00:00:00.000Z
  - start_timestamp: 2025-09-01T00:00:00.000Z

Status: completed

Assets:
#0
  - Handle: ledger_participants.csv
  - Output: gs://ledger-reports-stg/ledgers/bqrb-example/schemas/ledger_participants_rep/reports/$rep.-0waxrI60kN6FGkdI/assets/ledger_participants.csv


Access rules:
#0
  - Action: any
  - Signer:
    - public: aeblUjUYsPlYsWzWfajZIExO2Dz5NVbX2RRDpiiTwrc=

You can see that the report has na asset with handle ledger_participants.csv and that it's located at gs://ledger-reports-stg/ledgers/bqrb-example/schemas/ledger_participants_rep/reports/$rep.-0waxrI60kN6FGkdI/assets/ledger_participants.csv.

Downloading the report

To see the file created, you will need to download it:

$ minka report download 467VQuW3eu53er0lwqg7o ledger_participants.csv
File ledger_participants.csv downloaded successfully.

This is a regular csv file that you can view as you would normally. For example, we can just print it to the console:

$ cat ledger_participants.csv
ledger;wallet;domain;schema;symbol_handle;initiated_trx_numb;initiated_volume;success_trx_numb;success_volume;fail_trx_numb;fail_volume
bqrb-example;ach;;ach-wallet;N/A;0;0;0;0;0;0

Other operations

You can do other operations like sign, drop or view changes, the same as you normally would for other records so we will not go into details here.