Update subject ID mapping for a data ingest pipeline
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-09-16 12:56:52 +02:00
.datalad chore: initialize dataset 2026-09-16 11:04:16 +02:00
.gitattributes chore: initialize dataset 2026-09-16 11:04:16 +02:00
.noannex chore: initialize dataset 2026-09-16 11:04:16 +02:00
action.yml feat: support row-filters 2026-09-16 12:56:52 +02:00
LICENSE feat: initial action draft 2026-09-16 11:08:14 +02:00
README.md feat: support row-filters 2026-09-16 12:56:52 +02:00

Forgejo Action for generating (partial) subject ID mappings

Generates a filtered subject ID mapping from a broker's id.tsv and publishes it to a destination repository.

Parameters

The following optional parameters can be given via the with key. Example:

- name: Update ID mapping
  uses: https://hub.trr379.de/actions/update-subject-idmap@v1
  with:
    jwt-audience: u:1:<authorized-integration>
    destination-repo: q01-<site>/<source>
    destination-file: idmap.tsv
    columns: trr-sub,...
    miller-filter: '$diagnostics-case-id =~ "^36-[0-9]+$"'
Name Default Description
jwt-audience — Audience for the Forgejo JWT used to access the destination repository.
destination-repo — Repository to which the generated ID mapping is published.
destination-file — Name of the generated mapping file in the destination repository.
columns — Comma-separated list of columns to extract from id.tsv.
miller-filter - Optional filter containing a Miller DSL expression (see row filters)

Input row filtering

Use the optional miller-filter parameter to exclude rows before the selected columns are written to the destination file. The value is a Miller DSL expression. Fields are referenced with a $ prefix. Use == to compare to literal values. Regular expressions can be matched with the =~ operator. The filter is applied before the columns selection, so it can refer to any column in the source id.tsv file, including columns that are not included in the output.

This example keeps only rows where diagnostics-case-id consists of 36- followed by one or more digits.

miller-filter: '$diagnostics-case-id =~ "^36-[0-9]+$"'

AND conditions can be declared by concatenating them with &&. Use || to accept either of multiple patterns.

Additional examples:

miller-filter: '$trr-sub =~ "^[A-Z][0-9]+$" && $diagnostics-case-id =~ "^36-[0-9]+$"'
miller-filter: '$status =~ "^active$" || $status =~ "^pending$"'
miller-filter: '$site == "aachen" && $include == "true"'

License

MIT