Skip to content

Conversation

@RamiNoodle733
Copy link

@RamiNoodle733 RamiNoodle733 commented Feb 6, 2026

When using --detect-types with a CSV file containing only a header row (and no data rows), the insert would fail with 'Cannot transform a table that doesn't exist yet' because the table is only created when rows are inserted. This fix adds an existence check before attempting to transform.

Fixes #702


📚 Documentation preview 📚: https://sqlite-utils--706.org.readthedocs.build/en/706/

When using --detect-types with a CSV file containing only a header row
(and no data rows), the insert would fail with 'Cannot transform a table
that doesn't exist yet' because the table is only created when rows are
inserted. This fix adds an existence check before attempting to transform.

Fixes simonw#702
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.

Insert CSV with --detect-types crashes for CSV files that contain only a header row

1 participant