You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 6fcf030
Browse filesBrowse the repository at this point in the historyBrowse files
docs: proper Livebook format — setup cell, self-contained examples
- Setup uses single cell with Mix.install + require Dux
- Removed ## Setup/## Section headers (Livebook handles this)
- All examples are self-contained (use from_list/from_query, no
references to nonexistent files like sales.csv)
- Removed commented-out output (Livebook saves real output)
- Fixed next steps links to point to .livemd
- Atom keys throughout
Run in Livebook, execute all cells, save — outputs are embedded.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Operations accumulate in the `%Dux{}` struct. Nothing hits DuckDB until you call `compute/1`, `collect/1`, or `to_columns/1`:
26
+
Operations accumulate in the `%Dux{}` struct. Nothing hits DuckDB until you materialize:
36
27
37
28
```elixir
38
29
df =
39
30
Dux.from_query("SELECT * FROM range(1, 101) t(x)")
40
31
|>Dux.filter(x >50)
41
32
|>Dux.mutate(doubled: x *2)
42
33
43
-
# Inspect the lazy ops — no SQL has run yet
44
34
df.ops
45
35
```
46
36
47
37
```elixir
48
-
# NOW the SQL runs
49
38
Dux.collect(df)
50
39
```
51
40
52
-
This lets DuckDB see the full pipeline and optimize across operations.
41
+
## Expressions compile to SQL
53
42
54
-
### Expressions compile to SQL
55
-
56
-
`require Dux` enables the macro versions of `filter`, `mutate`, and `summarise`. Bare identifiers become column names. Use `^` to interpolate Elixir values:
43
+
Bare identifiers become column names. Use `^` to interpolate Elixir values as parameter bindings:
0 commit comments