Zum Hauptinhalt springen

Chapter 6: Names and references

1 Reading another project’s artefact at its latest version

kepler is a short name that famulus.yml imports for the notebook fam:kepler-lex-naturae/lex-naturae.

How many sentences and documents does the Kepler counter-check in {{ref:kepler/lex-natura-gegenprobe.gegenprobe}} contain?

Partitur
---
id: from-kepler
collections: [kepler-prim]
display: kennzahl
partiturs:
  - id: duckdb-read
    input:
      sql: |
        SELECT count(*) AS n_sentences,
               count(DISTINCT r.doc_id) AS n_documents
        FROM read_json_auto('{{ref:kepler/lex-natura-gegenprobe.gegenprobe}}') AS f,
             unnest(f.data.data.rows) AS t(r)
artefacts:
  - name: tally
    kind: table
    file: tally.json
---
How many sentences and documents does the Kepler counter-check in
{{ref:kepler/lex-natura-gegenprobe.gegenprobe}} contain?

43 Sätze, 16 Dokumente.

ohne Erwartung
43.0Sätze
16.0Dokumente

2 Reading a pinned version by its full name

How many correspondents and letters does version 2 of the Kármán roster list?

Partitur
---
id: from-karman
display: kennzahl
partiturs:
  - id: duckdb-read
    input:
      sql: |
        SELECT count(*) AS n_entries,
               sum(e.count) AS n_letters
        FROM read_json_auto('{{ref:fam:karman-nachlass/korrespondenz/karman-roster.roster@v2}}') AS f,
             unnest(f.data.data.entries) AS t(e)
artefacts:
  - name: tally
    kind: table
    file: tally.json
---
How many correspondents and letters does version 2 of the Kármán roster list?

489 n_entries, 1500 Briefe.

ohne Erwartung
489.0n_entries
1500.0Briefe

3 A short name with a pinned version

The notebook’s own uses gives manuscripts for the Kármán notebook at version 1.

How many items does the manuscript inventory {{ref:manuscripts/manuskripte.bestand}} list?

Partitur
---
id: via-alias
display: kennzahl
partiturs:
  - id: duckdb-read
    input:
      sql: |
        SELECT count(*) AS n_items
        FROM read_json_auto('{{ref:manuscripts/manuskripte.bestand}}') AS f,
             unnest(f.data.data.entries) AS t(e)
artefacts:
  - name: tally
    kind: table
    file: tally.json
---
How many items does the manuscript inventory {{ref:manuscripts/manuskripte.bestand}}
list?

191 n_items.

ohne Erwartung
191.0n_items

4 A block under its old name

The block ch03/kepler-cards was renamed ch03/kepler-evidence. The entry under moved in famulus.yml keeps the old name readable.

How many sentences does {{ref:ch03/kepler-cards.evidence}} hold?

Partitur
---
id: old-name
collections: [kepler-prim]
display: kennzahl
partiturs:
  - id: duckdb-read
    input:
      sql: |
        SELECT count(*) AS n_sentences
        FROM read_json_auto('{{ref:ch03/kepler-cards.evidence}}') AS f,
             unnest(f.data.data.rows) AS t(r)
artefacts:
  - name: tally
    kind: table
    file: tally.json
---
How many sentences does {{ref:ch03/kepler-cards.evidence}} hold?

3 Sätze.

ohne Erwartung
3.0Sätze