{"action":"created","comment":{"url":"https://api.github.com/repos/CartoDB/bigmetadata/pulls/comments/167899670","pull_request_review_id":96182401,"id":167899670,"diff_hunk":"@@ -799,23 +835,66 @@ class OBSMeta(Task):\n         'timespan': ['''\n CREATE TABLE {obs_meta} AS\n SELECT numer_timespan::TEXT timespan_id,\n-       numer_timespan::TEXT timespan_name,\n-       NULL::TEXT timespan_description,\n+       'numer'::TEXT timespan_type,\n+       numer_timespan_alias::TEXT timespan_alias,\n+       numer_timespan_name::TEXT timespan_name,\n+       numer_timespan_description::TEXT timespan_description,\n+       numer_timespan_range::DATERANGE timespan_range,\n+       numer_timespan_weight::NUMERIC timespan_weight,\n        NULL::JSONB timespan_tags, --FIRST(timespan_tags)::JSONB timespan_tags,\n-       NULL::NUMERIC timespan_weight,\n        NULL::JSONB timespan_extra,\n-       NULL::TEXT timespan_type,\n        NULL::TEXT timespan_aggregate,\n-       ARRAY_REMOVE(ARRAY_AGG(DISTINCT numer_id)::TEXT[], NULL) numers,\n-       ARRAY_REMOVE(ARRAY_AGG(DISTINCT denom_id)::TEXT[], NULL) denoms,\n-       ARRAY_REMOVE(ARRAY_AGG(DISTINCT geom_id)::TEXT[], NULL) geoms,\n        NULL::Geometry(Geometry, 4326) the_geom, -- ST_Union(DISTINCT ST_SetSRID(the_geom, 4326)) the_geom\n        NULL::Integer timespan_version\n FROM observatory.obs_meta_next\n-GROUP BY numer_timespan;\n+WHERE numer_timespan is NOT NULL\n+GROUP BY numer_timespan, numer_timespan_alias, numer_timespan_name,\n+         numer_timespan_description, numer_timespan_range, numer_timespan_weight;\n         ''',\n         '''\n-ALTER TABLE {obs_meta} ADD PRIMARY KEY (timespan_id);\n+INSERT INTO {obs_meta}\n+    (timespan_id, timespan_type, timespan_alias, timespan_name, timespan_description, timespan_range, timespan_weight,\n+    timespan_tags, timespan_extra, timespan_aggregate, the_geom, timespan_version)\n+SELECT denom_timespan::TEXT timespan_id,\n+       'denom'::TEXT timespan_type,\n+       denom_timespan_alias::TEXT timespan_alias,\n+       denom_timespan_name::TEXT timespan_name,\n+       denom_timespan_description::TEXT timespan_description,\n+       denom_timespan_range::DATERANGE timespan_range,\n+       denom_timespan_weight::NUMERIC timespan_weight,\n+       NULL::JSONB timespan_tags, --FIRST(timespan_tags)::JSONB timespan_tags,\n+       NULL::JSONB timespan_extra,\n+       NULL::TEXT timespan_aggregate,\n+       NULL::Geometry(Geometry, 4326) the_geom, -- ST_Union(DISTINCT ST_SetSRID(the_geom, 4326)) the_geom\n+       NULL::Integer timespan_version\n+FROM observatory.obs_meta_next\n+WHERE denom_timespan is NOT NULL\n+GROUP BY denom_timespan, denom_timespan_alias, denom_timespan_name,\n+         denom_timespan_description, denom_timespan_range, denom_timespan_weight;\n+        ''',\n+        '''\n+INSERT INTO {obs_meta}\n+    (timespan_id, timespan_type, timespan_alias, timespan_name, timespan_description, timespan_range, timespan_weight,\n+    timespan_tags, timespan_extra, timespan_aggregate, the_geom, timespan_version)\n+SELECT geom_timespan::TEXT timespan_id,\n+       'geom'::TEXT timespan_type,\n+       geom_timespan_alias::TEXT timespan_alias,\n+       geom_timespan_name::TEXT timespan_name,\n+       geom_timespan_description::TEXT timespan_description,\n+       geom_timespan_range::DATERANGE timespan_range,\n+       geom_timespan_weight::NUMERIC timespan_weight,\n+       NULL::JSONB timespan_tags, --FIRST(timespan_tags)::JSONB timespan_tags,\n+       NULL::JSONB timespan_extra,\n+       NULL::TEXT timespan_aggregate,\n+       NULL::Geometry(Geometry, 4326) the_geom, -- ST_Union(DISTINCT ST_SetSRID(the_geom, 4326)) the_geom\n+       NULL::Integer timespan_version\n+FROM observatory.obs_meta_next\n+WHERE geom_timespan is NOT NULL\n+GROUP BY geom_timespan, geom_timespan_alias, geom_timespan_name,\n+         geom_timespan_description, geom_timespan_range, geom_timespan_weight;\n+        ''',\n+        '''","path":"tasks/carto.py","position":199,"original_position":199,"commit_id":"5559bf25fd43d2b635561cbf81cb73b2f44702c6","original_commit_id":"5559bf25fd43d2b635561cbf81cb73b2f44702c6","user":{"login":"houndci-bot","id":6697940,"avatar_url":"https://avatars0.githubusercontent.com/u/6697940?v=4","gravatar_id":"","url":"https://api.github.com/users/houndci-bot","html_url":"https://github.com/houndci-bot","followers_url":"https://api.github.com/users/houndci-bot/followers","following_url":"https://api.github.com/users/houndci-bot/following{/other_user}","gists_url":"https://api.github.com/users/houndci-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci-bot/subscriptions","organizations_url":"https://api.github.com/users/houndci-bot/orgs","repos_url":"https://api.github.com/users/houndci-bot/repos","events_url":"https://api.github.com/users/houndci-bot/events{/privacy}","received_events_url":"https://api.github.com/users/houndci-bot/received_events","type":"User","site_admin":false},"body":"continuation line under-indented for visual indent","created_at":"2018-02-13T15:28:23Z","updated_at":"2018-02-13T15:28:23Z","html_url":"https://github.com/CartoDB/bigmetadata/pull/423#discussion_r167899670","pull_request_url":"https://api.github.com/repos/CartoDB/bigmetadata/pulls/423","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/CartoDB/bigmetadata/pulls/comments/167899670"},"html":{"href":"https://github.com/CartoDB/bigmetadata/pull/423#discussion_r167899670"},"pull_request":{"href":"https://api.github.com/repos/CartoDB/bigmetadata/pulls/423"}}},"pull_request":{"url":"https://api.github.com/repos/CartoDB/bigmetadata/pulls/423","id":168800863,"html_url":"https://github.com/CartoDB/bigmetadata/pull/423","diff_url":"https://github.com/CartoDB/bigmetadata/pull/423.diff","patch_url":"https://github.com/CartoDB/bigmetadata/pull/423.patch","issue_url":"https://api.github.com/repos/CartoDB/bigmetadata/issues/423","number":423,"state":"open","locked":false,"title":"Generation of obs_meta_timespan","user":{"login":"antoniocarlon","id":6155203,"avatar_url":"https://avatars0.githubusercontent.com/u/6155203?v=4","gravatar_id":"","url":"https://api.github.com/users/antoniocarlon","html_url":"https://github.com/antoniocarlon","followers_url":"https://api.github.com/users/antoniocarlon/followers","following_url":"https://api.github.com/users/antoniocarlon/following{/other_user}","gists_url":"https://api.github.com/users/antoniocarlon/gists{/gist_id}","starred_url":"https://api.github.com/users/antoniocarlon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antoniocarlon/subscriptions","organizations_url":"https://api.github.com/users/antoniocarlon/orgs","repos_url":"https://api.github.com/users/antoniocarlon/repos","events_url":"https://api.github.com/users/antoniocarlon/events{/privacy}","received_events_url":"https://api.github.com/users/antoniocarlon/received_events","type":"User","site_admin":false},"body":"Generation of obs_meta_timespan using OBS_Timespan\r\n\r\nCloses https://github.com/CartoDB/bigmetadata/issues/420","created_at":"2018-02-13T10:05:12Z","updated_at":"2018-02-13T15:28:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ef685005128ee03c86bc039933bf138b9b8db314","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":656249759,"url":"https://api.github.com/repos/CartoDB/bigmetadata/labels/blocked","name":"blocked","color":"b60205","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/CartoDB/bigmetadata/pulls/423/commits","review_comments_url":"https://api.github.com/repos/CartoDB/bigmetadata/pulls/423/comments","review_comment_url":"https://api.github.com/repos/CartoDB/bigmetadata/pulls/comments{/number}","comments_url":"https://api.github.com/repos/CartoDB/bigmetadata/issues/423/comments","statuses_url":"https://api.github.com/repos/CartoDB/bigmetadata/statuses/5559bf25fd43d2b635561cbf81cb73b2f44702c6","head":{"label":"CartoDB:420-Generation_of_obs_meta_timespan","ref":"420-Generation_of_obs_meta_timespan","sha":"5559bf25fd43d2b635561cbf81cb73b2f44702c6","user":{"login":"CartoDB","id":1799254,"avatar_url":"https://avatars0.githubusercontent.com/u/1799254?v=4","gravatar_id":"","url":"https://api.github.com/users/CartoDB","html_url":"https://github.com/CartoDB","followers_url":"https://api.github.com/users/CartoDB/followers","following_url":"https://api.github.com/users/CartoDB/following{/other_user}","gists_url":"https://api.github.com/users/CartoDB/gists{/gist_id}","starred_url":"https://api.github.com/users/CartoDB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CartoDB/subscriptions","organizations_url":"https://api.github.com/users/CartoDB/orgs","repos_url":"https://api.github.com/users/CartoDB/repos","events_url":"https://api.github.com/users/CartoDB/events{/privacy}","received_events_url":"https://api.github.com/users/CartoDB/received_events","type":"Organization","site_admin":false},"repo":{"id":47357348,"name":"bigmetadata","full_name":"CartoDB/bigmetadata","owner":{"login":"CartoDB","id":1799254,"avatar_url":"https://avatars0.githubusercontent.com/u/1799254?v=4","gravatar_id":"","url":"https://api.github.com/users/CartoDB","html_url":"https://github.com/CartoDB","followers_url":"https://api.github.com/users/CartoDB/followers","following_url":"https://api.github.com/users/CartoDB/following{/other_user}","gists_url":"https://api.github.com/users/CartoDB/gists{/gist_id}","starred_url":"https://api.github.com/users/CartoDB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CartoDB/subscriptions","organizations_url":"https://api.github.com/users/CartoDB/orgs","repos_url":"https://api.github.com/users/CartoDB/repos","events_url":"https://api.github.com/users/CartoDB/events{/privacy}","received_events_url":"https://api.github.com/users/CartoDB/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CartoDB/bigmetadata","description":null,"fork":false,"url":"https://api.github.com/repos/CartoDB/bigmetadata","forks_url":"https://api.github.com/repos/CartoDB/bigmetadata/forks","keys_url":"https://api.github.com/repos/CartoDB/bigmetadata/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CartoDB/bigmetadata/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CartoDB/bigmetadata/teams","hooks_url":"https://api.github.com/repos/CartoDB/bigmetadata/hooks","issue_events_url":"https://api.github.com/repos/CartoDB/bigmetadata/issues/events{/number}","events_url":"https://api.github.com/repos/CartoDB/bigmetadata/events","assignees_url":"https://api.github.com/repos/CartoDB/bigmetadata/assignees{/user}","branches_url":"https://api.github.com/repos/CartoDB/bigmetadata/branches{/branch}","tags_url":"https://api.github.com/repos/CartoDB/bigmetadata/tags","blobs_url":"https://api.github.com/repos/CartoDB/bigmetadata/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CartoDB/bigmetadata/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CartoDB/bigmetadata/git/refs{/sha}","trees_url":"https://api.github.com/repos/CartoDB/bigmetadata/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CartoDB/bigmetadata/statuses/{sha}","languages_url":"https://api.github.com/repos/CartoDB/bigmetadata/languages","stargazers_url":"https://api.github.com/repos/CartoDB/bigmetadata/stargazers","contributors_url":"https://api.github.com/repos/CartoDB/bigmetadata/contributors","subscribers_url":"https://api.github.com/repos/CartoDB/bigmetadata/subscribers","subscription_url":"https://api.github.com/repos/CartoDB/bigmetadata/subscription","commits_url":"https://api.github.com/repos/CartoDB/bigmetadata/commits{/sha}","git_commits_url":"https://api.github.com/repos/CartoDB/bigmetadata/git/commits{/sha}","comments_url":"https://api.github.com/repos/CartoDB/bigmetadata/comments{/number}","issue_comment_url":"https://api.github.com/repos/CartoDB/bigmetadata/issues/comments{/number}","contents_url":"https://api.github.com/repos/CartoDB/bigmetadata/contents/{+path}","compare_url":"https://api.github.com/repos/CartoDB/bigmetadata/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CartoDB/bigmetadata/merges","archive_url":"https://api.github.com/repos/CartoDB/bigmetadata/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CartoDB/bigmetadata/downloads","issues_url":"https://api.github.com/repos/CartoDB/bigmetadata/issues{/number}","pulls_url":"https://api.github.com/repos/CartoDB/bigmetadata/pulls{/number}","milestones_url":"https://api.github.com/repos/CartoDB/bigmetadata/milestones{/number}","notifications_url":"https://api.github.com/repos/CartoDB/bigmetadata/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CartoDB/bigmetadata/labels{/name}","releases_url":"https://api.github.com/repos/CartoDB/bigmetadata/releases{/id}","deployments_url":"https://api.github.com/repos/CartoDB/bigmetadata/deployments","created_at":"2015-12-03T20:09:45Z","updated_at":"2017-11-08T23:35:05Z","pushed_at":"2018-02-13T15:28:14Z","git_url":"git://github.com/CartoDB/bigmetadata.git","ssh_url":"git@github.com:CartoDB/bigmetadata.git","clone_url":"https://github.com/CartoDB/bigmetadata.git","svn_url":"https://github.com/CartoDB/bigmetadata","homepage":null,"size":683295,"stargazers_count":30,"watchers_count":30,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":6,"mirror_url":null,"archived":false,"open_issues_count":106,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause"},"forks":6,"open_issues":106,"watchers":30,"default_branch":"master"}},"base":{"label":"CartoDB:master","ref":"master","sha":"77fdfc9dbeff8cef891f7541299cd62ed5e37c0b","user":{"login":"CartoDB","id":1799254,"avatar_url":"https://avatars0.githubusercontent.com/u/1799254?v=4","gravatar_id":"","url":"https://api.github.com/users/CartoDB","html_url":"https://github.com/CartoDB","followers_url":"https://api.github.com/users/CartoDB/followers","following_url":"https://api.github.com/users/CartoDB/following{/other_user}","gists_url":"https://api.github.com/users/CartoDB/gists{/gist_id}","starred_url":"https://api.github.com/users/CartoDB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CartoDB/subscriptions","organizations_url":"https://api.github.com/users/CartoDB/orgs","repos_url":"https://api.github.com/users/CartoDB/repos","events_url":"https://api.github.com/users/CartoDB/events{/privacy}","received_events_url":"https://api.github.com/users/CartoDB/received_events","type":"Organization","site_admin":false},"repo":{"id":47357348,"name":"bigmetadata","full_name":"CartoDB/bigmetadata","owner":{"login":"CartoDB","id":1799254,"avatar_url":"https://avatars0.githubusercontent.com/u/1799254?v=4","gravatar_id":"","url":"https://api.github.com/users/CartoDB","html_url":"https://github.com/CartoDB","followers_url":"https://api.github.com/users/CartoDB/followers","following_url":"https://api.github.com/users/CartoDB/following{/other_user}","gists_url":"https://api.github.com/users/CartoDB/gists{/gist_id}","starred_url":"https://api.github.com/users/CartoDB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CartoDB/subscriptions","organizations_url":"https://api.github.com/users/CartoDB/orgs","repos_url":"https://api.github.com/users/CartoDB/repos","events_url":"https://api.github.com/users/CartoDB/events{/privacy}","received_events_url":"https://api.github.com/users/CartoDB/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CartoDB/bigmetadata","description":null,"fork":false,"url":"https://api.github.com/repos/CartoDB/bigmetadata","forks_url":"https://api.github.com/repos/CartoDB/bigmetadata/forks","keys_url":"https://api.github.com/repos/CartoDB/bigmetadata/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CartoDB/bigmetadata/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CartoDB/bigmetadata/teams","hooks_url":"https://api.github.com/repos/CartoDB/bigmetadata/hooks","issue_events_url":"https://api.github.com/repos/CartoDB/bigmetadata/issues/events{/number}","events_url":"https://api.github.com/repos/CartoDB/bigmetadata/events","assignees_url":"https://api.github.com/repos/CartoDB/bigmetadata/assignees{/user}","branches_url":"https://api.github.com/repos/CartoDB/bigmetadata/branches{/branch}","tags_url":"https://api.github.com/repos/CartoDB/bigmetadata/tags","blobs_url":"https://api.github.com/repos/CartoDB/bigmetadata/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CartoDB/bigmetadata/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CartoDB/bigmetadata/git/refs{/sha}","trees_url":"https://api.github.com/repos/CartoDB/bigmetadata/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CartoDB/bigmetadata/statuses/{sha}","languages_url":"https://api.github.com/repos/CartoDB/bigmetadata/languages","stargazers_url":"https://api.github.com/repos/CartoDB/bigmetadata/stargazers","contributors_url":"https://api.github.com/repos/CartoDB/bigmetadata/contributors","subscribers_url":"https://api.github.com/repos/CartoDB/bigmetadata/subscribers","subscription_url":"https://api.github.com/repos/CartoDB/bigmetadata/subscription","commits_url":"https://api.github.com/repos/CartoDB/bigmetadata/commits{/sha}","git_commits_url":"https://api.github.com/repos/CartoDB/bigmetadata/git/commits{/sha}","comments_url":"https://api.github.com/repos/CartoDB/bigmetadata/comments{/number}","issue_comment_url":"https://api.github.com/repos/CartoDB/bigmetadata/issues/comments{/number}","contents_url":"https://api.github.com/repos/CartoDB/bigmetadata/contents/{+path}","compare_url":"https://api.github.com/repos/CartoDB/bigmetadata/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CartoDB/bigmetadata/merges","archive_url":"https://api.github.com/repos/CartoDB/bigmetadata/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CartoDB/bigmetadata/downloads","issues_url":"https://api.github.com/repos/CartoDB/bigmetadata/issues{/number}","pulls_url":"https://api.github.com/repos/CartoDB/bigmetadata/pulls{/number}","milestones_url":"https://api.github.com/repos/CartoDB/bigmetadata/milestones{/number}","notifications_url":"https://api.github.com/repos/CartoDB/bigmetadata/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CartoDB/bigmetadata/labels{/name}","releases_url":"https://api.github.com/repos/CartoDB/bigmetadata/releases{/id}","deployments_url":"https://api.github.com/repos/CartoDB/bigmetadata/deployments","created_at":"2015-12-03T20:09:45Z","updated_at":"2017-11-08T23:35:05Z","pushed_at":"2018-02-13T15:28:14Z","git_url":"git://github.com/CartoDB/bigmetadata.git","ssh_url":"git@github.com:CartoDB/bigmetadata.git","clone_url":"https://github.com/CartoDB/bigmetadata.git","svn_url":"https://github.com/CartoDB/bigmetadata","homepage":null,"size":683295,"stargazers_count":30,"watchers_count":30,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":6,"mirror_url":null,"archived":false,"open_issues_count":106,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause"},"forks":6,"open_issues":106,"watchers":30,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/CartoDB/bigmetadata/pulls/423"},"html":{"href":"https://github.com/CartoDB/bigmetadata/pull/423"},"issue":{"href":"https://api.github.com/repos/CartoDB/bigmetadata/issues/423"},"comments":{"href":"https://api.github.com/repos/CartoDB/bigmetadata/issues/423/comments"},"review_comments":{"href":"https://api.github.com/repos/CartoDB/bigmetadata/pulls/423/comments"},"review_comment":{"href":"https://api.github.com/repos/CartoDB/bigmetadata/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/CartoDB/bigmetadata/pulls/423/commits"},"statuses":{"href":"https://api.github.com/repos/CartoDB/bigmetadata/statuses/5559bf25fd43d2b635561cbf81cb73b2f44702c6"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"houndci-bot"}}