Skip to content

fix: validate target column exists in dataset and reject non-CSV files#349

Open
shivv23 wants to merge 1 commit into
c2siorg:mainfrom
shivv23:feat/target-column-validation
Open

fix: validate target column exists in dataset and reject non-CSV files#349
shivv23 wants to merge 1 commit into
c2siorg:mainfrom
shivv23:feat/target-column-validation

Conversation

@shivv23
Copy link
Copy Markdown
Contributor

@shivv23 shivv23 commented May 22, 2026

Summary

Improve robustness of the target field assignment endpoint by validating that the target column actually exists in the dataset, and rejecting non-CSV file types.

Changes

  • add_target_service: Now returns 400 if the file is not CSV, and validates the target column exists in file.columns before creating the record
  • 3 new tests: covers non-CSV rejection, missing column rejection, and valid column acceptance

Validation

  • 3 new unit tests added
  • Single commit, rebased on latest main

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