Skip to content

Latest commit

 

History

16 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ISO 20022 camt.053 → RDF

Converts ISO 20022 camt.053 bank statement XML files into RDF using konstrukt.

Tested with camt.053.001.04 account statements from PostFinance Switzerland.

Pipeline

Load XML
    ↓
SPARQL CONSTRUCT → clean ISO 20022 RDF  →  output/camt.nt
    ↓
SPARQL CONSTRUCT → OLAP cube observations  →  output/cube.nt

Stage 2 (queries/01-camt-to-rdf/) produces named RDF nodes for Statements, Entries, and Balances with all key fields from the camt.053 structure.

Stage 3 (queries/02-rdf-to-cube/) derives one cube:Observation per entry using the cube.link vocabulary, suited for aggregation and analytics.

Usage

# Default: loads from input/
./run.sh

# Custom input directory
./run.sh /path/to/statements/

Querying

Load output/camt.nt and/or output/cube.nt into any SPARQL endpoint. A QLever setup is included in qlever/:

cd qlever
qlever index --overwrite-existing
qlever start

Sample queries and an interactive notebook are in docs/QUERIES.sparqlbook — open with the SPARQL Notebook VS Code extension. The raw .rq files are in docs/sparql/.

Run the smoke test to verify all queries return results:

./smoke-test.sh

Data model

Prefix Namespace
iso20022: http://example.org/iso20022#
cube: https://cube.link/
dim: https://example.org/dimension/
Resource IRI
Statement http://example.org/statement/{stmtId}
Entry http://example.org/entry/{acctSvcrRef}
Balance http://example.org/balance/{stmtId}/{balType}
Observation https://example.org/observation/{acctSvcrRef}

Requirements

  • konstrukt in $PATH
  • envsubst (standard on macOS/Linux)

Schema reference

Schema files available from the official ISO 20022 message definitions catalogue at https://www.iso20022.org/iso-20022-message-definitions. The input files use camt.053.001.04.

About

Converts ISO 20022 camt.053 bank statement XML files into RDF

Topics

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages