Skip to content

Experiments: queries on arrays with -> - #353

Merged
lloydtabb merged 1 commit into
mainfrom
claude/eloquent-bardeen-23st5f-array-docs
Nov 12, 2026
Merged

lloydtabb merged 1 commit into
mainfrom
claude/eloquent-bardeen-23st5f-array-docs

Conversation

@lloydtabb

Copy link
Copy Markdown
Contributor

Docs for ##! experimental.array_queries, the array -> { ... } arrow from malloydata/malloy#3195 as narrowed in malloydata/malloy#3205. Merge after #3205 lands, since the page describes #3205's limits.

What's here

  • experiments/array_queries.malloynb, a new page:
    • why nested data is stored that way;
    • unnesting versus querying an array with ->;
    • why the arrow helps:
      • a fact about a session becomes a dimension;
      • filtering sessions without losing their hits, worked through with the top pages of sessions that made a purchase;
    • common patterns on the GA sample: did something happen, one thing and not another, when it began and ended, the first event, the top few of each row, one thing before another, arrays inside the elements;
    • what an arrow returns;
    • each database's limits, with the exact error messages.
  • experiments.malloynb lists the flag and links the page.
  • table_of_contents.json has a "Queries on Arrays" entry under Experiments.
  • For unnesting, the page links to "Reading Nested Data" rather than repeating it.

Static examples

The examples are fenced code inside markdown, not >>>malloy cells, as on the givens page, because the docs build on Malloy 0.0.433 and no release has the arrow yet.

  • The results shown were run on DuckDB against the docs' ga_sample.parquet.
  • The error messages were captured by compiling against #3205's branch.

Once a release has the arrow and the docs move to it, the examples could become live cells.

Checked

  • Built the experiments section with tsx scripts/index.ts --only /documentation/experiments. The page compiles and renders: highlighting, result tables, and notes as blockquotes.
  • The build reports ../-style links as invalid when only part of the site is built. It does so for the existing givens, parameters and persistence pages too. The new page's one such link, to ../patterns/reading_nested.malloynb, has the same form.
  • The full site build was not run.

Generated by Claude Code

A page for `##! experimental.array_queries`: why nested data is stored
that way, unnesting versus querying an array with `->`, why the arrow
helps (a fact about a session as a dimension; filtering sessions without
losing their hits), common patterns on the GA sample, what an arrow
returns, and each database's limits with its error messages.

The examples are static, as the givens page's are: the arrow is in no
Malloy release the docs build on yet. Results were run on DuckDB against
the docs' ga_sample.parquet.

Listed on the experiments page and in the table of contents. It links to
"Reading Nested Data" for unnesting rather than repeating it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NvYaMvB6W3Sph3b7Lvbjzc
Signed-off-by: Claude <noreply@anthropic.com>
@lloydtabb
lloydtabb marked this pull request as ready for review November 12, 2026 18:06
@lloydtabb
lloydtabb merged commit 5586ac6 into main Nov 12, 2026
5 checks passed
@lloydtabb
lloydtabb deleted the claude/eloquent-bardeen-23st5f-array-docs branch November 12, 2026 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants