onyxfish/csvkit — Issue #132: 0.4.0 csvsql direct import not working
Author: jpvelez
Created: 2011-11-30 03:19:13+00:00
State: open

Chris, I'm still getting the same import error I had before you implemented this new import method. 1. Seems like it still chokes on the long integers.

``` 'INSERT INTO p3 ("GEOID", "SUMLEV", "STATE", "COUNTY", "CBSA", "CSA", "NECTA", "CNECTA", "NAME", "POP100", "HU100", "POP100.2000", "HU100.2000", "P003001", "P003001.2000", "P003002", "P003002.2000", "P003003", "P003003.2000", "P003004", "P003004.2000", "P003005", "P003005.2000", "P003006", "P003006.2000", "P003007", "P003007.2000", "P003008", "P003008.2000") VALUES (%(GEOID)s, %(SUMLEV)s, %(STATE)s, %(COUNTY)s, %(CBSA)s, %(CSA)s, %(NECTA)s, %(CNECTA)s, %(NAME)s, %(POP100)s, %(HU100)s, %(POP100.2000)s, %(HU100.2000)s, %(P003001)s, %(P003001.2000)s, %(P003002)s, %(P003002.2000)s, %(P003003)s, %(P003003.2000)s, %(P003004)s, %(P003004.2000)s, %(P003005)s, %(P003005.2000)s, %(P003006)s, %(P003006.2000)s, %(P003007)s, %(P003007.2000)s, %(P003008)s, %(P003008.2000)**s)'** {'P003006': 1, 'P003007': 24, 'P003004': 7, 'P003005': 45, 'P003002': 4412, 'P003003': 62, 'P003001': 4627, 'P003008': 76, 'SUMLEV': 140, 'CBSA': 39500, 'P003004.2000': 6, 'CNECTA': None, 'P003002.2000': 4177, 'HU100': 2222, 'P003006.2000': 0, 'POP100': 4627, 'P003007.2000': 9, 'P003005.2000': 26, 'P003008.2000': 31, 'CSA': 999, 'COUNTY': u'001', 'P003003.2000': 77, 'P003001.2000': 4326, 'HU100.2000': 2042, 'GEOID': 17001000100, 'NAME': u'Census Tract 1', 'STATE': 17, 'NECTA': None, 'POP100.2000': 4326}```

2. Also, the VALUES part of this INSERT statement looks kind of funky, doesn't look like the syntax that --inserts used to generate in 0.3.0, not sure if that's how it's supposed to look.