-
-
Notifications
You must be signed in to change notification settings - Fork 50
Description
Describe the bug
A clear and concise description of what the bug is.
Value tokens like 0003530043 and 00126 are converted to text without their leading zeros.
Expected behavior
Using CLI option --no-type-inference or --type-hint-header with a column that hints text, then the value 0003530043 should be converted as 0003530043 rather than 3530043.
To Reproduce
Steps to reproduce the behavior:
- Given this CSV called zero.csv:
column1, column2-text
123, 0123
0123, 123
123, 0123
- And the CLI:
sqlitebiter --type-hint-header -o zero.sqlite file zero.csv - Then after
sqlite3 zero.sqlite:
.header on;
select * from zero;
- I expect you will see:
column1|column2-text
123|123
123|123
123|123
- Verify the table's structure:
CREATE TABLE IF NOT EXISTS 'zero'([column1] INTEGER, [column2-text] TEXT);
Environments
Please complete the following information:
-
uname: Darwin the-admiralty 18.7.0 x86_64
-
CPython version: 3.7.5
-
sqlitebiter version: not installed
-
SimpleSQLite version: not installed
-
pytablereader version: not installed
-
Installation Method:
brew
Additional context
Add any other context (logs, error output, etc.) about the problem here.
(If it’s long, please paste to https://ghostbin.co/ and insert the link here.)