I’m having some troubles importing data from a cvs file with street addresses and the logs are not providing any meaningful information.
I installed CartoDB locally on Mac OSX 10.10.
Following are some console output which doesn't specify any errors:
Resque:
** [03:21:15 2014年11月05日] 64961: Found job on imports
** [03:21:15 2014年11月05日] 64961: got: (Job{imports} | Resque::ImporterJobs | [{"job_id"=>"f248f418-5d88-4c06-ab2c-4bbbfdea88ce"}])
** [03:21:15 2014年11月05日] 64961: Running before_fork hook with [(Job{imports} | Resque::ImporterJobs | [{"job_id"=>"f248f418-5d88-4c06-ab2c-4bbbfdea88ce"}])]
** [03:21:15 2014年11月05日] 64961: resque-1.23.0: Forked 65262 at 1415186475
** [03:21:15 2014年11月05日] 65262: resque-1.23.0: Processing imports since 1415186475
** [03:21:15 2014年11月05日] 65262: done: (Job{imports} | Resque::ImporterJobs | [{"job_id"=>"f248f418-5d88-4c06-ab2c-4bbbfdea88ce"}])
** [03:21:15 2014年11月05日] 64961: Checking imports
Rails:
(0.000132s) SET DateStyle = 'ISO'
(0.000130s) SET search_path TO "public", cartodb, public
Started GET "/api/v1/imports/f248f418-5d88-4c06-ab2c-4bbbfdea88ce" for 127.0.0.1 at 2014年11月05日 03:21:15 -0800
Processing by Api::Json::ImportsController#show as JSON
Parameters: {"id"=>"f248f418-5d88-4c06-ab2c-4bbbfdea88ce"}
Completed 200 OK in 3ms (Views: 0.3ms | Models: 0.0ms)
Started GET "/api/v1/imports/f248f418-5d88-4c06-ab2c-4bbbfdea88ce" for 127.0.0.1 at 2014年11月05日 03:21:17 -0800
Processing by Api::Json::ImportsController#show as JSON
Parameters: {"id"=>"f248f418-5d88-4c06-ab2c-4bbbfdea88ce"}
Completed 200 OK in 3ms (Views: 0.3ms | Models: 0.0ms)
The CartoDB UI shows an error:
Unable to load data (2001)
Persisting error ? Send us the following code: "f248f418-5d88-4c06-ab2c-4bbbfdea88ce"
The csv file has following format:
TIMESTAMP,NUMBER,STREET,CITY,STATE,ZIPCODE
2014年09月05日T13:16:14.178Z,800,some street,some city,some state,some zipcode
1 Answer 1
In Rails, you should check the import log as follows:
DataImport.find(id: 'f248f418-5d88-4c06-ab2c-4bbbfdea88ce').log
Typical errors for CSV files are: - File has some weird encoding. Solution: open it with a text editor and save it as UTF-8. - In the street you're using commas that are being interpreted as new rows. If this is the case, be sure that your cells are double quoted as: "2014-09-05T13:16:14.178Z","800","some street","some city","some state","some zipcode"