Your browser sucks, JavaScript disabled! Gunnar's console needs JavaScript and WebAssembly. Git over SSH on port 2222 does not.

nordisk/knut

.nornir/assets/thund-write-mode.svg

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 900 360" font-family="-apple-system,Segoe UI,Roboto,sans-serif" font-size="14">
  <defs>
    <marker id="a" markerWidth="9" markerHeight="9" refX="7" refY="3" orient="auto">
      <path d="M0,0 L7,3 L0,6 Z" fill="#555"/>
    </marker>
  </defs>
  <text x="24" y="26" font-weight="700" font-size="16">Dataset.write_mode — overwrite vs append on a re-run</text>
  <text x="24" y="46" fill="#555" font-size="12">A partitioned sink writes fresh part-files each run; the mode decides whether a re-run clears first or piles up.</text>

  <!-- flow / materialised rows (blue) -->
  <rect x="24" y="150" width="150" height="90" rx="8" fill="#eef3fb" stroke="#2b5fb3" stroke-width="1.5"/>
  <text x="99" y="180" text-anchor="middle" font-weight="600">Flow → sink</text>
  <text x="99" y="202" text-anchor="middle" fill="#555" font-size="11">by_region</text>
  <text x="99" y="220" text-anchor="middle" fill="#555" font-size="11">3 rows / run</text>

  <!-- APPEND lane (green, accumulates) -->
  <path d="M174,175 L236,120" fill="none" stroke="#555" stroke-width="1.5" marker-end="url(#a)"/>
  <text x="196" y="132" fill="#2f8f4e" font-size="11" font-weight="600">Append</text>
  <text x="248" y="86" fill="#2f8f4e" font-size="12" font-weight="600">write_mode = Append (default) — accumulate</text>
  <rect x="248" y="96" width="330" height="70" rx="8" fill="#eefaf0" stroke="#2f8f4e" stroke-width="1.5"/>
  <text x="413" y="120" text-anchor="middle" font-weight="600">out/by_region/  (dir kept)</text>
  <text x="413" y="140" text-anchor="middle" fill="#555" font-size="11">run 1: region=US/part-a  region=EU/part-a</text>
  <text x="413" y="156" text-anchor="middle" fill="#555" font-size="11">run 2: region=US/part-b  region=EU/part-b  (+added)</text>
  <rect x="602" y="106" width="120" height="50" rx="8" fill="#f6eefb" stroke="#7a3fb3" stroke-width="1.5"/>
  <text x="662" y="130" text-anchor="middle" font-weight="700" font-size="13">6 rows</text>
  <text x="662" y="148" text-anchor="middle" fill="#7a3fb3" font-size="11">two generations</text>
  <path d="M578,131 L602,131" fill="none" stroke="#555" stroke-width="1.5" marker-end="url(#a)"/>

  <!-- OVERWRITE lane (orange, clears first) -->
  <path d="M174,215 L236,268" fill="none" stroke="#555" stroke-width="1.5" marker-end="url(#a)"/>
  <text x="188" y="258" fill="#c26a2b" font-size="11" font-weight="600">Overwrite</text>
  <text x="248" y="214" fill="#c26a2b" font-size="12" font-weight="600">write_mode = Overwrite — clear, then write</text>
  <rect x="248" y="224" width="330" height="70" rx="8" fill="#fdf2ec" stroke="#c26a2b" stroke-width="1.5"/>
  <text x="413" y="248" text-anchor="middle" font-weight="600">clear_sink_target → remove_dir_all</text>
  <text x="413" y="268" text-anchor="middle" fill="#555" font-size="11">run 2: dir wiped first, then region=US/  region=EU/</text>
  <text x="413" y="284" text-anchor="middle" fill="#c26a2b" font-size="11" font-style="italic">fresh-dir semantics</text>
  <rect x="602" y="234" width="120" height="50" rx="8" fill="#f6eefb" stroke="#7a3fb3" stroke-width="1.5"/>
  <text x="662" y="258" text-anchor="middle" font-weight="700" font-size="13">3 rows</text>
  <text x="662" y="276" text-anchor="middle" fill="#7a3fb3" font-size="11">one generation</text>
  <path d="M578,259 L602,259" fill="none" stroke="#555" stroke-width="1.5" marker-end="url(#a)"/>

  <!-- additive note -->
  <rect x="742" y="150" width="140" height="90" rx="8" fill="#f7f7f7" stroke="#bbb" stroke-width="1.2"/>
  <text x="812" y="174" text-anchor="middle" font-weight="600" font-size="12">additive (L2)</text>
  <text x="812" y="194" text-anchor="middle" fill="#555" font-size="11">default = Append</text>
  <text x="812" y="210" text-anchor="middle" fill="#555" font-size="11">serde-skipped</text>
  <text x="812" y="226" text-anchor="middle" fill="#555" font-size="11">native file sink</text>
</svg>