Skip to content

CLI reference

java -jar carml-jar-X.jar [-v] <command> [options]

The commands are map and plan. --help after a command prints its options.

map

Runs a mapping.

Input

Option Value Default Meaning
-m, --mapping path required A mapping file, or a directory that is searched recursively. Repeatable.
-f, --format ttl, nt, nq, rdf, jsonld, trig, n3, trix, ... from the file extension The RDF format of the mapping files.
-r, -rsl, --rel-src-loc path The directory that source paths in the mapping are relative to.

Output

Option Value Default Meaning
-o, --output path standard output The output file. For an existing directory, the file output inside it.
-F, -of, --outformat format name nq The output format. map --help lists the names your build supports.
-P, --pretty off Pretty-print. Collects the whole output in memory first.
-p, --prefixes prefix=iri or a prefix name, comma-separated none Prefixes to use in the output. Repeatable.
-M, -pm, --prefix-mapping path the bundled prefix.cc list JSON or YAML files that map prefix names to IRIs, for names given with -p.
-b, --base-iri IRI http://example.org/ The base for relative IRIs in the output.
-l, --limit number no limit Stop after this many statements.

Execution

Option Value Default Meaning
-E, --evaluator auto, reactive, in-process-db auto Which evaluator runs the views. Lower case only.
--spill-to-disk off Use disk for inputs larger than memory. See Large inputs.
--in-process-db-memory size, such as 4GB or 512MB from free memory DuckDB's memory limit. Needs --spill-to-disk.
--reactive-spill-threshold number of rows 50000 Parent rows above which a reactive join moves to DuckDB. Needs --spill-to-disk.
--dedup auto, none, view, full auto The deduplication mode.
--direct-serialization auto, off auto Whether DuckDB may write the output itself. See Direct serialization.
-S, --strict off Fail the run when a reference never produces a value. Turns off direct serialization.
--metrics optional host:port off Serve and push metrics. The gateway defaults to localhost:9091.
-v, --verbose errors only -v for info, -vv for debug, -vvv for trace.

Exit codes

Code Meaning
0 Success
1 The mapping failed
2 Invalid command line

plan

Analyzes a mapping and recommends how to run it. It reads no source data.

Option Value Meaning
-m, --mapping path As for map.
-f, --format format name As for map.
-r, -rsl, --rel-src-loc path Copied into the recommended command.
--source-iterations name=count The number of records in a source. Repeatable. The name is the one the plan prints for the source.
-i, --interactive Ask for the counts that are missing.

plan recommends DuckDB for a triples map with joins unless every source involved is known to have at most 100,000 records, and for a triples map without joins when its source has more than 100,000. It recommends the reactive evaluator otherwise, and always for sources DuckDB cannot read.

To get more logging from plan, put -v before the command: java -jar carml-jar-X.jar -v plan -m mapping.ttl.