{"action":"created","issue":{"url":"https://api.github.com/repos/CartoDB/cartodb/issues/1994","labels_url":"https://api.github.com/repos/CartoDB/cartodb/issues/1994/labels{/name}","comments_url":"https://api.github.com/repos/CartoDB/cartodb/issues/1994/comments","events_url":"https://api.github.com/repos/CartoDB/cartodb/issues/1994/events","html_url":"https://github.com/CartoDB/cartodb/issues/1994","id":55940244,"number":1994,"title":"Latitude and longitude geocoding doesn't geocode all rows","user":{"login":"juanignaciosl","id":932968,"avatar_url":"https://avatars.githubusercontent.com/u/932968?v=3","gravatar_id":"","url":"https://api.github.com/users/juanignaciosl","html_url":"https://github.com/juanignaciosl","followers_url":"https://api.github.com/users/juanignaciosl/followers","following_url":"https://api.github.com/users/juanignaciosl/following{/other_user}","gists_url":"https://api.github.com/users/juanignaciosl/gists{/gist_id}","starred_url":"https://api.github.com/users/juanignaciosl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juanignaciosl/subscriptions","organizations_url":"https://api.github.com/users/juanignaciosl/orgs","repos_url":"https://api.github.com/users/juanignaciosl/repos","events_url":"https://api.github.com/users/juanignaciosl/events{/privacy}","received_events_url":"https://api.github.com/users/juanignaciosl/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/CartoDB/cartodb/labels/2%20-%20Working","name":"2 - Working","color":"CCCCCC"},{"url":"https://api.github.com/repos/CartoDB/cartodb/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/CartoDB/cartodb/labels/From%20Support","name":"From Support","color":"009800"}],"state":"open","locked":false,"assignee":{"login":"juanignaciosl","id":932968,"avatar_url":"https://avatars.githubusercontent.com/u/932968?v=3","gravatar_id":"","url":"https://api.github.com/users/juanignaciosl","html_url":"https://github.com/juanignaciosl","followers_url":"https://api.github.com/users/juanignaciosl/followers","following_url":"https://api.github.com/users/juanignaciosl/following{/other_user}","gists_url":"https://api.github.com/users/juanignaciosl/gists{/gist_id}","starred_url":"https://api.github.com/users/juanignaciosl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juanignaciosl/subscriptions","organizations_url":"https://api.github.com/users/juanignaciosl/orgs","repos_url":"https://api.github.com/users/juanignaciosl/repos","events_url":"https://api.github.com/users/juanignaciosl/events{/privacy}","received_events_url":"https://api.github.com/users/juanignaciosl/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/CartoDB/cartodb/milestones/31","labels_url":"https://api.github.com/repos/CartoDB/cartodb/milestones/31/labels","id":916727,"number":31,"title":"Castrourdiales","description":"- [ ] Url rewrite (@kartones // @javisantana)\r\n- [ ] New create dialog for new dashboard (@jmedina)\r\n- [ ] Integrate Medusa on New Dashboard (@javierarce)\r\n- [ ] Medusa cartodb.js (@javierarce)\r\n- [ ] Common data (@juanignaciosl) \r\n- [ ] Temp. Maps API Experiments (@rochoa)\r\n- [ ] Limits per user / plan (@lbosque)","creator":{"login":"saleiva","id":132149,"avatar_url":"https://avatars.githubusercontent.com/u/132149?v=3","gravatar_id":"","url":"https://api.github.com/users/saleiva","html_url":"https://github.com/saleiva","followers_url":"https://api.github.com/users/saleiva/followers","following_url":"https://api.github.com/users/saleiva/following{/other_user}","gists_url":"https://api.github.com/users/saleiva/gists{/gist_id}","starred_url":"https://api.github.com/users/saleiva/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saleiva/subscriptions","organizations_url":"https://api.github.com/users/saleiva/orgs","repos_url":"https://api.github.com/users/saleiva/repos","events_url":"https://api.github.com/users/saleiva/events{/privacy}","received_events_url":"https://api.github.com/users/saleiva/received_events","type":"User","site_admin":false},"open_issues":54,"closed_issues":36,"state":"open","created_at":"2014-12-29T14:58:28Z","updated_at":"2015-01-30T18:18:30Z","due_on":"2015-02-04T23:00:00Z","closed_at":null},"comments":1,"created_at":"2015-01-29T18:52:33Z","updated_at":"2015-01-30T18:30:35Z","closed_at":null,"body":"Importing a big table that has latitude and longitude columns the_geom is null for some right values. Many rows have not valid data, and thus shouldn't be geocoded, but right ones should.\r\n\r\nhttps://cartodb.supportbee.com/tickets/4337851"},"comment":{"url":"https://api.github.com/repos/CartoDB/cartodb/issues/comments/72247177","html_url":"https://github.com/CartoDB/cartodb/issues/1994#issuecomment-72247177","issue_url":"https://api.github.com/repos/CartoDB/cartodb/issues/1994","id":72247177,"user":{"login":"juanignaciosl","id":932968,"avatar_url":"https://avatars.githubusercontent.com/u/932968?v=3","gravatar_id":"","url":"https://api.github.com/users/juanignaciosl","html_url":"https://github.com/juanignaciosl","followers_url":"https://api.github.com/users/juanignaciosl/followers","following_url":"https://api.github.com/users/juanignaciosl/following{/other_user}","gists_url":"https://api.github.com/users/juanignaciosl/gists{/gist_id}","starred_url":"https://api.github.com/users/juanignaciosl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juanignaciosl/subscriptions","organizations_url":"https://api.github.com/users/juanignaciosl/orgs","repos_url":"https://api.github.com/users/juanignaciosl/repos","events_url":"https://api.github.com/users/juanignaciosl/events{/privacy}","received_events_url":"https://api.github.com/users/juanignaciosl/received_events","type":"User","site_admin":false},"created_at":"2015-01-30T18:30:35Z","updated_at":"2015-01-30T18:30:35Z","body":"The problem is in [QueryBatcher stop condition](https://github.com/CartoDB/cartodb/blob/master/services/importer/lib/importer/query_batcher.rb#L82): when a batch doesn't meet where condition `affected_rows_count` is 0 and will stop. A solution to this would be moving the where condition from main query to [CTID subquery](https://github.com/CartoDB/cartodb/blob/master/services/importer/lib/importer/query_batcher.rb#L37), but it timeouts with the lat-long query of this issue, it's slower. A solution might be batching with cartodb_id."}}