Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

read_xarray doesn't work on all xarray datasets

Abierto
#180 4 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

  • #214 de @JHON12091986 — cerrado sin fusionar

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
35/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
pandas, python
Área
data

Línea de trabajo

Start with xarray_sql/reader.py, where XarrayRecordBatchReader.__init__ rejects datasets whose variables have different dimensions, and trace how read_xarray passes options into the reader. Check the closed pull request #214 and the existing reader tests for relevant context. Done means callers can select data variables when reading a dataset with differing dimensions and the behavior is covered by a test.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

ds = xr.open_zarr(
  'gs://gcp-public-data-arco-era5/ar/full_37-1h-0p25deg-chunk-1.zarr-v3',
  chunks=None,  # Turn dask off
  storage_options={'token': 'anon'}  # Anonymous read from the public GCS bucket — no auth required.
)
xql.read_xarray(ds)
File ~/repos/xarray-sql/xarray_sql/reader.py:96, in XarrayRecordBatchReader.__init__(self, ds, chunks, batch_size, _iteration_callback)
     94 fst = next(iter(ds.values())).dims
     95 if not all(da.dims == fst for da in ds.values()):
---> [96](https://file+.vscode-resource.vscode-cdn.net/Users/ahuang/repos/xarray-sql/~/repos/xarray-sql/xarray_sql/reader.py:96)     raise ValueError(
     97         "All dimensions must be equal. Please filter data_vars in the Dataset."
     98     )

ValueError: All dimensions must be equal. Please filter data_vars in the Dataset.

So, I tried:

xql.read_xarray(ds, data_vars=["surface"])

But data_vars isn't a kwarg.

Should read_xarray have an option to pass data_vars?

Lenguaje dominante
Python
Estrellas
142
Forks
19
Merge medio
1 d 9 h
PR fusionados (30 d)
9

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de xqlsystems/xarray-sql

Todos los issues de xqlsystems/xarray-sql

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.