<?xml version="1.0" encoding="utf-8"?> 
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
 <title type="text">Will Lachance&#39;s Log: Posts tagged &#39;duckdb&#39;</title>
 <link rel="self" href="https://wrla.ch/feeds/duckdb.atom.xml" />
 <link href="https://wrla.ch/tags/duckdb.html" />
 <id>urn:https-wrla-ch:-tags-duckdb-html</id>
 <updated>2026-08-23T21:11:16Z</updated>

 <entry>
  <title type="text">Glean Dictionary + DuckDB</title>
  <link rel="alternate" href="https://wrla.ch/log/2026/08/glean-dictionary-duckdb/?utm_source=duckdb&amp;utm_medium=Atom" />
  <id>urn:https-wrla-ch:-log-2026-08-glean-dictionary-duckdb</id>
  <published>2026-08-23T21:11:16Z</published>
  <updated>2026-08-23T21:11:16Z</updated>
  <author>
   <name>Will Lachance</name></author>
  <content type="html">
&lt;p&gt;While working on &lt;a href=&#34;https://wrla.ch/log/2026/08/writing-the-docs-2026-edition/&#34;&gt;Writing the Docs: 2026 Edition&lt;/a&gt;,
I experimented a bit with updating the &lt;a href=&#34;https://github.com/mozilla/glean-dictionary&#34;&gt;Glean Dictionary&lt;/a&gt; to
incorporate some of the ideas in the essay, in particular those around reference documentation.&lt;/p&gt;
&lt;p&gt;As a sort of demonstration that documentation &lt;em&gt;about&lt;/em&gt; an application can be
treated as a data product in and of itself, I hacked up a &lt;a href=&#34;https://github.com/wlach/glean-dictionary/commit/13dbdb005b5ee8399e7169962711be418066def2#diff-d9d516c7dbf3d149aa587b0a96e73e2ab209d5d7753915f5e4ce304df5f757d8&#34;&gt;quick ETL pipeline&lt;/a&gt; to dump the JSON output of the Glean Dictionary into a &lt;a href=&#34;https://duckdb.org/&#34;&gt;DuckDB&lt;/a&gt; database that can be queried standalone.&lt;/p&gt;
&lt;p&gt;Since the Glean Dictionary is just a static &lt;a href=&#34;https://www.netlify.com/&#34;&gt;Netlify&lt;/a&gt; site, the DuckDB database can simply
be published alongside as a standard file.
This allows you to do fun things from the DuckDB console like:&lt;/p&gt;
&lt;div class=&#34;brush: &#34;&gt;&lt;div class=&#34;colorful&#34;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;memory D ATTACH &#39;https://glean-dictionary-DuckDB.netlify.app/data/glean_dictionary.DuckDB&#39; AS glean_dictionary (READ_ONLY);
memory D SELECT type, count(*) AS metrics
         FROM glean_dictionary.metrics
         GROUP BY type
         ORDER BY metrics DESC;
┌─────────────────────────────┬─────────┐
│            type             │ metrics │
│           varchar           │  int64  │
├─────────────────────────────┼─────────┤
│ counter                     │   20057 │
│ event                       │    7256 │
│ string                      │    3545 │
│ labeled_counter             │    3275 │
│ timing_distribution         │    2481 │
│ custom_distribution         │    2169 │
│ quantity                    │    1406 │
│ boolean                     │    1078 │
│ text                        │     588 │
│ labeled_timing_distribution │     569 │
│ datetime                    │     404 │
│ memory_distribution         │     389 │
│ object                      │     369 │
│ labeled_custom_distribution │     340 │
│ rate                        │     215 │
│ dual_labeled_counter        │     210 │
│ string_list                 │     204 │
│ uuid                        │     181 │
│ timespan                    │     149 │
│ labeled_boolean             │     118 │
│ labeled_string              │      84 │
│ labeled_memory_distribution │      66 │
│ labeled_quantity            │      42 │
│ url                         │      26 │
└─────────────────────────────┴─────────┘
  24 rows                     2 columns
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;From there, you could either build an interface like the Glean Dictionary itself (much easier to do from
a database than the somewhat harebrained dataclass soup I originally came up with) or any number
of other data products or analyses. Here&#39;s an example marimo notebook that tracks the metrics added
to each product over time:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;/log/2026/08/glean-dictionary-duckdb/glean-dictionary-duckdb.png&#34; alt=&#34;Marimo Notebook examining the Glean Dictionary metrics&#34; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://molab.marimo.io/notebooks/nb_5vHgD1X1DY4RQV8rwgi7iu/app&#34;&gt;Open in Molab&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;As you can see, the number of metrics did a big jump in 2024 (I imagine they finally moved Firefox Desktop over to Glean) with slower and steadier growth since.&lt;/p&gt;
</content></entry>
</feed>