apache / apache/superset

Chart is not showing the columns, if dataset has zero records

Open
#34,196 6 comments 0 reactions 0 assignees View on GitHub
requires:more-info viz:charts
Dominant language
Python
Stars
74.8k
Forks
18.3k
Avg merge
2d 4h
Merged PRs (30d)
664

Description

### Bug description

Hi All

We are creating a superset dataset and creating a chart from the dataset, we are creating a dataset from the parquet file, using duckdb engine.

When our parquet file is empty (But columns exists) and we are creating the dataset using the empty parquet. We use this dataset to create a chart
Once chart is created, chart will show the error saying that columns are missing.
Because my parquet file is empty, superset is not able to read the column, if parquet/dataset records are zero.

Please help us how we can fix this issue in superset.

Please find the screenshot for referance

Image

### Screenshots/recordings

_No response_

### Superset version

4.1.2

### Python version

3.9

### Node version

16

### Browser

Chrome

### Additional context

_No response_

### Checklist

- [ ] I have searched Superset docs and Slack and didn't find a solution to my problem.
- [ ] I have searched the GitHub issue tracker and didn't find a similar bug report.
- [ ] I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.

Contributor guide

Open the contributing guide

Research direction

Reproduce the problem with a DuckDB-backed Superset dataset created from an empty parquet file whose schema still contains columns, then trace how dataset metadata reaches chart validation. Done means a chart built from the empty dataset recognizes the existing columns instead of reporting that they are missing; no source files or tests are named in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data-visualization
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.