Skip to content

GSoC Idea Discussion: Native xarray Support in Lumen via XarraySource #1748

Description

@SanketMeghale

Hi, I am preparing for the Lumen + xarray Integration GSoC idea and wanted to get feedback on the technical direction and MVP scope.

After reviewing Lumen's source architecture, my current view is that xarray support should be introduced as a native XarraySource built on Source, rather than on BaseSQLSource.

The main reason is that xarray is fundamentally coordinate-aware and multidimensional, while BaseSQLSource is centered around SQL expressions and SQL execution. Starting from a SQL-first abstraction seems likely to force premature flattening and lose important xarray semantics too early. My current thinking is that SQL interoperability, if needed, would fit better as a later interoperability layer rather than as the MVP foundation.

Current design:

  • xarray.Dataset as the backend object
  • data_vars exposed as logical tables
  • 1D coordinates exposed as queryable/filterable fields
  • dims and attrs preserved through metadata
  • filtering handled natively in xarray
  • results converted to pandas DataFrames at the compatibility boundary

Current MVP scope:

  • get_tables()
  • get_schema()
  • get_metadata()
  • get()
  • in-memory and URI-based dataset loading
  • coordinate-aware filtering with datetime/date coercion

I am currently treating aggregation as out of scope for get() and more appropriate for a later transform layer.

I have prototyped this locally with tests for schema, metadata, filtering, URI loading, and edge cases, and also validated it against xarray's real air_temperature tutorial dataset.

The main questions I would appreciate feedback on are:

  1. Does exposing Dataset.data_vars as logical tables seem like the right MVP model?
  2. Does it make sense to keep aggregation in a transform layer rather than in the source API?
  3. Is native source-level support the right first milestone, with SQL/AI interoperability deferred to later work?
  4. Should multi-file dataset support be part of the MVP, or a later extension?

Any feedback on whether this seems like the right direction would be very helpful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions