{"action":"created","comment":{"url":"https://api.github.com/repos/airbnb/caravel/pulls/comments/85857293","pull_request_review_id":6478029,"id":85857293,"diff_hunk":"@@ -1588,19 +1588,53 @@ def activity_per_day(self):\n \n     @api\n     @has_access_api\n-    @expose(\"/tables/<db_id>/<schema>\")\n+    @expose(\"/schemas/<db_id>\")\n+    @cached_view(timeout=600)\n+    def schemas(self, db_id):\n+        # db_id = request.args.get('db_id')\n+        database = (\n+            db.session\n+            .query(models.Database)\n+            .filter_by(id=db_id)\n+            .one()\n+        )\n+        return Response(\n+            json.dumps({'schemas': database.all_schema_names()}),\n+            mimetype=\"application/json\")\n+\n+    @api\n+    @has_access_api\n+    @expose(\"/tables/<db_id>/<schema>/\")\n+    @cached_view(timeout=600)","path":"caravel/views.py","position":31,"original_position":31,"commit_id":"d7c072aeaf0402a743e68d6aeae2a25f00e4a891","original_commit_id":"d7c072aeaf0402a743e68d6aeae2a25f00e4a891","user":{"login":"mistercrunch","id":487433,"avatar_url":"https://avatars.githubusercontent.com/u/487433?v=3","gravatar_id":"","url":"https://api.github.com/users/mistercrunch","html_url":"https://github.com/mistercrunch","followers_url":"https://api.github.com/users/mistercrunch/followers","following_url":"https://api.github.com/users/mistercrunch/following{/other_user}","gists_url":"https://api.github.com/users/mistercrunch/gists{/gist_id}","starred_url":"https://api.github.com/users/mistercrunch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mistercrunch/subscriptions","organizations_url":"https://api.github.com/users/mistercrunch/orgs","repos_url":"https://api.github.com/users/mistercrunch/repos","events_url":"https://api.github.com/users/mistercrunch/events{/privacy}","received_events_url":"https://api.github.com/users/mistercrunch/received_events","type":"User","site_admin":false},"body":"600 -> config.get('METDATA_CACHE_TIMEOUT')","created_at":"2016-11-01T00:00:35Z","updated_at":"2016-11-01T00:14:11Z","html_url":"https://github.com/airbnb/caravel/pull/1466#discussion_r85857293","pull_request_url":"https://api.github.com/repos/airbnb/caravel/pulls/1466","_links":{"self":{"href":"https://api.github.com/repos/airbnb/caravel/pulls/comments/85857293"},"html":{"href":"https://github.com/airbnb/caravel/pull/1466#discussion_r85857293"},"pull_request":{"href":"https://api.github.com/repos/airbnb/caravel/pulls/1466"}}},"pull_request":{"url":"https://api.github.com/repos/airbnb/caravel/pulls/1466","id":91307267,"html_url":"https://github.com/airbnb/caravel/pull/1466","diff_url":"https://github.com/airbnb/caravel/pull/1466.diff","patch_url":"https://github.com/airbnb/caravel/pull/1466.patch","issue_url":"https://api.github.com/repos/airbnb/caravel/issues/1466","number":1466,"state":"open","locked":false,"title":"Implement caching and dynamic data fetching.","user":{"login":"bkyryliuk","id":5727938,"avatar_url":"https://avatars.githubusercontent.com/u/5727938?v=3","gravatar_id":"","url":"https://api.github.com/users/bkyryliuk","html_url":"https://github.com/bkyryliuk","followers_url":"https://api.github.com/users/bkyryliuk/followers","following_url":"https://api.github.com/users/bkyryliuk/following{/other_user}","gists_url":"https://api.github.com/users/bkyryliuk/gists{/gist_id}","starred_url":"https://api.github.com/users/bkyryliuk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bkyryliuk/subscriptions","organizations_url":"https://api.github.com/users/bkyryliuk/orgs","repos_url":"https://api.github.com/users/bkyryliuk/repos","events_url":"https://api.github.com/users/bkyryliuk/events{/privacy}","received_events_url":"https://api.github.com/users/bkyryliuk/received_events","type":"User","site_admin":false},"body":"**Implemented ability to search across the schemas:**\n- added caching to the `/tables/<db_id>/<schema>/` endpoint\n- added caching to the function that fetches all the table names for the database\n- implemented dynamic fetching for the table / view names\n- added @cached_view and @cached_cls_func decorators\n\nImplements https://github.com/airbnb/caravel/issues/1415\n\n<img width=\"1417\" alt=\"screen shot 2016-10-27 at 5 24 35 pm\" src=\"https://cloud.githubusercontent.com/assets/5727938/19790731/6fa61d2e-9c6f-11e6-9af5-b768a3f03d9f.png\">\n\n**Testing**\n- tested locally on presto and mysql DBs\n- plan to test on the caravel box using proxy\n\n**Reviewers**\n- @mistercrunch \n- @ascott \n- @vera-liu \n","created_at":"2016-10-28T01:04:53Z","updated_at":"2016-11-01T00:14:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2f31e0eefac44bdf56d3e3693cf52d0dfc7badad","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/airbnb/caravel/pulls/1466/commits","review_comments_url":"https://api.github.com/repos/airbnb/caravel/pulls/1466/comments","review_comment_url":"https://api.github.com/repos/airbnb/caravel/pulls/comments{/number}","comments_url":"https://api.github.com/repos/airbnb/caravel/issues/1466/comments","statuses_url":"https://api.github.com/repos/airbnb/caravel/statuses/d7c072aeaf0402a743e68d6aeae2a25f00e4a891","head":{"label":"bkyryliuk:sql_lab/full_text_search","ref":"sql_lab/full_text_search","sha":"d7c072aeaf0402a743e68d6aeae2a25f00e4a891","user":{"login":"bkyryliuk","id":5727938,"avatar_url":"https://avatars.githubusercontent.com/u/5727938?v=3","gravatar_id":"","url":"https://api.github.com/users/bkyryliuk","html_url":"https://github.com/bkyryliuk","followers_url":"https://api.github.com/users/bkyryliuk/followers","following_url":"https://api.github.com/users/bkyryliuk/following{/other_user}","gists_url":"https://api.github.com/users/bkyryliuk/gists{/gist_id}","starred_url":"https://api.github.com/users/bkyryliuk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bkyryliuk/subscriptions","organizations_url":"https://api.github.com/users/bkyryliuk/orgs","repos_url":"https://api.github.com/users/bkyryliuk/repos","events_url":"https://api.github.com/users/bkyryliuk/events{/privacy}","received_events_url":"https://api.github.com/users/bkyryliuk/received_events","type":"User","site_admin":false},"repo":{"id":61239887,"name":"caravel","full_name":"bkyryliuk/caravel","owner":{"login":"bkyryliuk","id":5727938,"avatar_url":"https://avatars.githubusercontent.com/u/5727938?v=3","gravatar_id":"","url":"https://api.github.com/users/bkyryliuk","html_url":"https://github.com/bkyryliuk","followers_url":"https://api.github.com/users/bkyryliuk/followers","following_url":"https://api.github.com/users/bkyryliuk/following{/other_user}","gists_url":"https://api.github.com/users/bkyryliuk/gists{/gist_id}","starred_url":"https://api.github.com/users/bkyryliuk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bkyryliuk/subscriptions","organizations_url":"https://api.github.com/users/bkyryliuk/orgs","repos_url":"https://api.github.com/users/bkyryliuk/repos","events_url":"https://api.github.com/users/bkyryliuk/events{/privacy}","received_events_url":"https://api.github.com/users/bkyryliuk/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bkyryliuk/caravel","description":"Caravel is a data exploration platform designed to be visual, intuitive, and interactive","fork":true,"url":"https://api.github.com/repos/bkyryliuk/caravel","forks_url":"https://api.github.com/repos/bkyryliuk/caravel/forks","keys_url":"https://api.github.com/repos/bkyryliuk/caravel/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bkyryliuk/caravel/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bkyryliuk/caravel/teams","hooks_url":"https://api.github.com/repos/bkyryliuk/caravel/hooks","issue_events_url":"https://api.github.com/repos/bkyryliuk/caravel/issues/events{/number}","events_url":"https://api.github.com/repos/bkyryliuk/caravel/events","assignees_url":"https://api.github.com/repos/bkyryliuk/caravel/assignees{/user}","branches_url":"https://api.github.com/repos/bkyryliuk/caravel/branches{/branch}","tags_url":"https://api.github.com/repos/bkyryliuk/caravel/tags","blobs_url":"https://api.github.com/repos/bkyryliuk/caravel/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bkyryliuk/caravel/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bkyryliuk/caravel/git/refs{/sha}","trees_url":"https://api.github.com/repos/bkyryliuk/caravel/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bkyryliuk/caravel/statuses/{sha}","languages_url":"https://api.github.com/repos/bkyryliuk/caravel/languages","stargazers_url":"https://api.github.com/repos/bkyryliuk/caravel/stargazers","contributors_url":"https://api.github.com/repos/bkyryliuk/caravel/contributors","subscribers_url":"https://api.github.com/repos/bkyryliuk/caravel/subscribers","subscription_url":"https://api.github.com/repos/bkyryliuk/caravel/subscription","commits_url":"https://api.github.com/repos/bkyryliuk/caravel/commits{/sha}","git_commits_url":"https://api.github.com/repos/bkyryliuk/caravel/git/commits{/sha}","comments_url":"https://api.github.com/repos/bkyryliuk/caravel/comments{/number}","issue_comment_url":"https://api.github.com/repos/bkyryliuk/caravel/issues/comments{/number}","contents_url":"https://api.github.com/repos/bkyryliuk/caravel/contents/{+path}","compare_url":"https://api.github.com/repos/bkyryliuk/caravel/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bkyryliuk/caravel/merges","archive_url":"https://api.github.com/repos/bkyryliuk/caravel/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bkyryliuk/caravel/downloads","issues_url":"https://api.github.com/repos/bkyryliuk/caravel/issues{/number}","pulls_url":"https://api.github.com/repos/bkyryliuk/caravel/pulls{/number}","milestones_url":"https://api.github.com/repos/bkyryliuk/caravel/milestones{/number}","notifications_url":"https://api.github.com/repos/bkyryliuk/caravel/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bkyryliuk/caravel/labels{/name}","releases_url":"https://api.github.com/repos/bkyryliuk/caravel/releases{/id}","deployments_url":"https://api.github.com/repos/bkyryliuk/caravel/deployments","created_at":"2016-06-15T20:47:09Z","updated_at":"2016-06-15T20:47:11Z","pushed_at":"2016-11-01T00:05:40Z","git_url":"git://github.com/bkyryliuk/caravel.git","ssh_url":"git@github.com:bkyryliuk/caravel.git","clone_url":"https://github.com/bkyryliuk/caravel.git","svn_url":"https://github.com/bkyryliuk/caravel","homepage":"","size":38147,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":4,"forks":1,"open_issues":4,"watchers":1,"default_branch":"master"}},"base":{"label":"airbnb:master","ref":"master","sha":"d2826ab7af4da1b36816150b71002ed966c553cd","user":{"login":"airbnb","id":698437,"avatar_url":"https://avatars.githubusercontent.com/u/698437?v=3","gravatar_id":"","url":"https://api.github.com/users/airbnb","html_url":"https://github.com/airbnb","followers_url":"https://api.github.com/users/airbnb/followers","following_url":"https://api.github.com/users/airbnb/following{/other_user}","gists_url":"https://api.github.com/users/airbnb/gists{/gist_id}","starred_url":"https://api.github.com/users/airbnb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/airbnb/subscriptions","organizations_url":"https://api.github.com/users/airbnb/orgs","repos_url":"https://api.github.com/users/airbnb/repos","events_url":"https://api.github.com/users/airbnb/events{/privacy}","received_events_url":"https://api.github.com/users/airbnb/received_events","type":"Organization","site_admin":false},"repo":{"id":39464018,"name":"caravel","full_name":"airbnb/caravel","owner":{"login":"airbnb","id":698437,"avatar_url":"https://avatars.githubusercontent.com/u/698437?v=3","gravatar_id":"","url":"https://api.github.com/users/airbnb","html_url":"https://github.com/airbnb","followers_url":"https://api.github.com/users/airbnb/followers","following_url":"https://api.github.com/users/airbnb/following{/other_user}","gists_url":"https://api.github.com/users/airbnb/gists{/gist_id}","starred_url":"https://api.github.com/users/airbnb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/airbnb/subscriptions","organizations_url":"https://api.github.com/users/airbnb/orgs","repos_url":"https://api.github.com/users/airbnb/repos","events_url":"https://api.github.com/users/airbnb/events{/privacy}","received_events_url":"https://api.github.com/users/airbnb/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/airbnb/caravel","description":"Caravel is a data exploration platform designed to be visual, intuitive, and interactive","fork":false,"url":"https://api.github.com/repos/airbnb/caravel","forks_url":"https://api.github.com/repos/airbnb/caravel/forks","keys_url":"https://api.github.com/repos/airbnb/caravel/keys{/key_id}","collaborators_url":"https://api.github.com/repos/airbnb/caravel/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/airbnb/caravel/teams","hooks_url":"https://api.github.com/repos/airbnb/caravel/hooks","issue_events_url":"https://api.github.com/repos/airbnb/caravel/issues/events{/number}","events_url":"https://api.github.com/repos/airbnb/caravel/events","assignees_url":"https://api.github.com/repos/airbnb/caravel/assignees{/user}","branches_url":"https://api.github.com/repos/airbnb/caravel/branches{/branch}","tags_url":"https://api.github.com/repos/airbnb/caravel/tags","blobs_url":"https://api.github.com/repos/airbnb/caravel/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/airbnb/caravel/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/airbnb/caravel/git/refs{/sha}","trees_url":"https://api.github.com/repos/airbnb/caravel/git/trees{/sha}","statuses_url":"https://api.github.com/repos/airbnb/caravel/statuses/{sha}","languages_url":"https://api.github.com/repos/airbnb/caravel/languages","stargazers_url":"https://api.github.com/repos/airbnb/caravel/stargazers","contributors_url":"https://api.github.com/repos/airbnb/caravel/contributors","subscribers_url":"https://api.github.com/repos/airbnb/caravel/subscribers","subscription_url":"https://api.github.com/repos/airbnb/caravel/subscription","commits_url":"https://api.github.com/repos/airbnb/caravel/commits{/sha}","git_commits_url":"https://api.github.com/repos/airbnb/caravel/git/commits{/sha}","comments_url":"https://api.github.com/repos/airbnb/caravel/comments{/number}","issue_comment_url":"https://api.github.com/repos/airbnb/caravel/issues/comments{/number}","contents_url":"https://api.github.com/repos/airbnb/caravel/contents/{+path}","compare_url":"https://api.github.com/repos/airbnb/caravel/compare/{base}...{head}","merges_url":"https://api.github.com/repos/airbnb/caravel/merges","archive_url":"https://api.github.com/repos/airbnb/caravel/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/airbnb/caravel/downloads","issues_url":"https://api.github.com/repos/airbnb/caravel/issues{/number}","pulls_url":"https://api.github.com/repos/airbnb/caravel/pulls{/number}","milestones_url":"https://api.github.com/repos/airbnb/caravel/milestones{/number}","notifications_url":"https://api.github.com/repos/airbnb/caravel/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/airbnb/caravel/labels{/name}","releases_url":"https://api.github.com/repos/airbnb/caravel/releases{/id}","deployments_url":"https://api.github.com/repos/airbnb/caravel/deployments","created_at":"2015-07-21T18:55:34Z","updated_at":"2016-10-31T20:42:10Z","pushed_at":"2016-11-01T00:05:40Z","git_url":"git://github.com/airbnb/caravel.git","ssh_url":"git@github.com:airbnb/caravel.git","clone_url":"https://github.com/airbnb/caravel.git","svn_url":"https://github.com/airbnb/caravel","homepage":"","size":44739,"stargazers_count":7855,"watchers_count":7855,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":946,"mirror_url":null,"open_issues_count":295,"forks":946,"open_issues":295,"watchers":7855,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/airbnb/caravel/pulls/1466"},"html":{"href":"https://github.com/airbnb/caravel/pull/1466"},"issue":{"href":"https://api.github.com/repos/airbnb/caravel/issues/1466"},"comments":{"href":"https://api.github.com/repos/airbnb/caravel/issues/1466/comments"},"review_comments":{"href":"https://api.github.com/repos/airbnb/caravel/pulls/1466/comments"},"review_comment":{"href":"https://api.github.com/repos/airbnb/caravel/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/airbnb/caravel/pulls/1466/commits"},"statuses":{"href":"https://api.github.com/repos/airbnb/caravel/statuses/d7c072aeaf0402a743e68d6aeae2a25f00e4a891"}}}}
{"actor":{"display_login":"mistercrunch"}}