Skip to content

fix: convert empty strings to NULL when transforming text columns to integer/float (#488)#746

Open
SAY-5 wants to merge 1 commit into
simonw:mainfrom
SAY-5:fix/transform-empty-to-null-488
Open

fix: convert empty strings to NULL when transforming text columns to integer/float (#488)#746
SAY-5 wants to merge 1 commit into
simonw:mainfrom
SAY-5:fix/transform-empty-to-null-488

Conversation

@SAY-5
Copy link
Copy Markdown

@SAY-5 SAY-5 commented May 22, 2026

Closes #488. When .transform(types={col: int}) or {col: float} converts a TEXT column to INTEGER/REAL, empty-string values in the source rows are now written as NULL via NULLIF(col, '') in the copy SQL, matching the design noted in the issue. Text columns are unaffected.


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

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.

sqlite-utils transform should set empty strings to null when converting text columns to integer/float

1 participant