Skip to content

[DRAFT] Change table load to retain original header row, for improved errors #1788

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: horizon
Choose a base branch
from

Conversation

dbp
Copy link
Collaborator

@dbp dbp commented Jun 27, 2025

Currently the error when you have the wrong number of columns listed is better than it was originally (relating to #1779), but it still makes no reference to the headers in the source itself.

In the case that we are loading from a CSV (or, google sheets?) it seems like we should show that header row when we display the error, ideally in a form that could be copied and pasted.

This is definitely a draft -- it doesn't touch the google sheet code (which I don't know where lives -- CPO?), and I'm not sure if this is the right way to retain that info, but throwing out the header row immediately makes it impossible to report a good error.

With this change, mismatches report the header columns that showed up in the CSV (if present), as well as the first data row (as an example). The c-strs aren't ideal, but I didn't want to spend time refining in case there is another approach that would be better (also, they were already there with current behavior).

Screenshot 2025-06-27 at 1 14 51 PM

@dbp dbp marked this pull request as draft June 27, 2025 17:16
@dbp dbp requested a review from jpolitz June 27, 2025 17:16
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.

1 participant