feat: add Arraylake source control - #1889
Conversation
Adds ArraylakeSourceControls, a parametric input control that opens an Arraylake repository (repo/branch/group) and registers it as an XArraySQLSource, mirroring how uploaded CSVs become a DuckDBSource.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #1889 +/- ##
==========================================
+ Coverage 70.60% 70.69% +0.08%
==========================================
Files 195 197 +2
Lines 33630 33770 +140
==========================================
+ Hits 23746 23875 +129
- Misses 9884 9895 +11 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
| @@ -1,3 +1,4 @@ | |||
| from .arraylake import ArraylakeSourceControls | |||
There was a problem hiding this comment.
Should this be guarded if imports are available? Try/except?
There was a problem hiding this comment.
Yess!! we can guard it and, add try/except.
| return SourceResult.empty( | ||
| "Arraylake support requires `pip install lumen[arraylake]` " | ||
| "(Python >=3.12)." | ||
| ) |
There was a problem hiding this comment.
Yeah, will add this in util...
|
Can you try it out on the UI? Ask the agent to query for something. |
|
Dug into the slow load and validated it. The open is fine now (sizing the Icechunk snapshot cache took it from ~205s to ~16s, that config is in the control). The rest is registration, and it is an xarray-sql scaling issue rather than a control problem. xarray-sql creates one scan partition per native chunk and enumerates them all at registration. I measured it on tiny synthetic data (same data, only the chunking changes):
So ~25us per partition, linear in the number of chunks. GOES is chunked one timestep per chunk: The real fix is upstream in xarray-sql: coalesce native chunks into a bounded number of scan partitions (or enumerate lazily) so registration cost is independent of how finely the store is chunked. That fixes it for the current The control itself works well on a subset (registers in ~16s, queries in ~1s), and it shows up and loads in the UI under its own Arraylake tab. |
|
Nice find! Can you show a screen recording of it please? |
|
Suree!! |
Screen.Recording.2026-06-13.at.12.54.13.AM.mov |
…ult UI - Wrap the ArraylakeSourceControls import in try/except (review feedback). - Extract the open logic into open_arraylake_dataset() util (review feedback). - Add the control to the default source_controls (skips None when deps absent).
|
Hey @ahuang11, On making the dropdowns dynamic: the group can be auto-discovered, but the repo list can't.
Groups are dynamic. Once a repo is open I walk its zarr tree and populate the Group dropdown from the groups that actually hold data, so no group paths are hardcoded (they were fragile anyway, ERA5's real group is So, How should we move forward ? |
|
Can you share how you manually discover the repos? Is there a link? |
|
No link to list them. So I found them by probing names with |
|
Do you mind asking around in https://discourse.pangeo.io/? |
Yup, Thanks for sharing this, will create a Topic here |
|
Thanks a lot, Andrew!! |



Adds
ArraylakeSourceControls, a parametric input control that opens an Arraylake repository (repo / branch / group) and registers it as anXArraySQLSource, so Lumen AI can query Icechunk/Zarr stores the same way uploaded CSVs become aDuckDBSource. It drops 0-dim scalar metadata vars, unifies inconsistent chunks, and sizes the Icechunk snapshot cache so real-world stores like GOES register cleanly and fast (~200s to ~16s open).Result (live
earthmover-public/goes-16):