Skip to content
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

leading zeroes / --shape args #62

Open
jsfenfen opened this issue Feb 7, 2020 · 0 comments
Open

leading zeroes / --shape args #62

jsfenfen opened this issue Feb 7, 2020 · 0 comments

Comments

@jsfenfen
Copy link
Sponsor

jsfenfen commented Feb 7, 2020

Hi @simonw I'm having a hard time applying the shape function. I can use the native .import function, but that brings in everything as text, but I'd love to specify that the ZCTA columns have leading zeroes while other int columns don't. Edited to say this is easy to work around by just making the sqlite file by "normal" means.

That said, this and #42 both have leading zero issues. I was running version 0.9.2

Running csvs-to-sqlite --shape "ZCTA5:ZCTA5(TEXT)" zctas.csv zctas.db on a csv like the following results in the output having the leading zeroes removed although using the shape arg does result in the type being string (without specifying type it is imported as an integer, which also removes the leading zeroes).

ZCTA5
00601
00601
00602
00603
00606
00606
00610
00612
00616
00617
00622
00623
00624
00624
00627
00631
00631
00637
00637
00638

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants