{"action":"created","comment":{"url":"https://api.github.com/repos/airbnb/caravel/pulls/comments/75827714","id":75827714,"diff_hunk":"@@ -125,6 +126,67 @@ def refresh_druid():\n             \"[\" + cluster.cluster_name + \"]\")\n     session.commit()\n \n+@manager.option(\n+    '-p', '--prefix', default=\"\",\n+    help=\"Sync Table Prefix\")\n+@manager.option(\n+    '-d', '--database', default=None,\n+    help=\"Specifies database (use caravel db name, not real db name)\")\n+def synctable(prefix, database):\n+    ''' Sync DB Table with Caravel Table'''\n+    print(\"\")\n+\n+    if (prefix == \"\" and database is None) or (database == 'main' and prefix == \"\"):","path":"caravel/bin/caravel","position":22,"original_position":22,"commit_id":"e264d201df217ef463e4d901635289344cb2d20d","original_commit_id":"e264d201df217ef463e4d901635289344cb2d20d","user":{"login":"xrmx","id":12932,"avatar_url":"https://avatars.githubusercontent.com/u/12932?v=3","gravatar_id":"","url":"https://api.github.com/users/xrmx","html_url":"https://github.com/xrmx","followers_url":"https://api.github.com/users/xrmx/followers","following_url":"https://api.github.com/users/xrmx/following{/other_user}","gists_url":"https://api.github.com/users/xrmx/gists{/gist_id}","starred_url":"https://api.github.com/users/xrmx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xrmx/subscriptions","organizations_url":"https://api.github.com/users/xrmx/orgs","repos_url":"https://api.github.com/users/xrmx/repos","events_url":"https://api.github.com/users/xrmx/events{/privacy}","received_events_url":"https://api.github.com/users/xrmx/received_events","type":"User","site_admin":false},"body":"Thanks for the explaination","created_at":"2016-08-23T09:08:24Z","updated_at":"2016-08-23T09:08:24Z","html_url":"https://github.com/airbnb/caravel/pull/977#discussion_r75827714","pull_request_url":"https://api.github.com/repos/airbnb/caravel/pulls/977","_links":{"self":{"href":"https://api.github.com/repos/airbnb/caravel/pulls/comments/75827714"},"html":{"href":"https://github.com/airbnb/caravel/pull/977#discussion_r75827714"},"pull_request":{"href":"https://api.github.com/repos/airbnb/caravel/pulls/977"}}},"pull_request":{"url":"https://api.github.com/repos/airbnb/caravel/pulls/977","id":81754940,"html_url":"https://github.com/airbnb/caravel/pull/977","diff_url":"https://github.com/airbnb/caravel/pull/977.diff","patch_url":"https://github.com/airbnb/caravel/pull/977.patch","issue_url":"https://api.github.com/repos/airbnb/caravel/issues/977","number":977,"state":"open","locked":false,"title":"Add synctable command into caravel","user":{"login":"linroex","id":1254953,"avatar_url":"https://avatars.githubusercontent.com/u/1254953?v=3","gravatar_id":"","url":"https://api.github.com/users/linroex","html_url":"https://github.com/linroex","followers_url":"https://api.github.com/users/linroex/followers","following_url":"https://api.github.com/users/linroex/following{/other_user}","gists_url":"https://api.github.com/users/linroex/gists{/gist_id}","starred_url":"https://api.github.com/users/linroex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/linroex/subscriptions","organizations_url":"https://api.github.com/users/linroex/orgs","repos_url":"https://api.github.com/users/linroex/repos","events_url":"https://api.github.com/users/linroex/events{/privacy}","received_events_url":"https://api.github.com/users/linroex/received_events","type":"User","site_admin":false},"body":"Sometime we have many table need insert to caravel tables, I write a command can help people to do this, set a table name prefix or default is data_ , this cmd will scan caravel has table and database all table, compare and insert it.","created_at":"2016-08-18T04:19:35Z","updated_at":"2016-08-23T09:08:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2b892258562e1bae1f4bc7a61b3d6f26a120fb38","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/airbnb/caravel/pulls/977/commits","review_comments_url":"https://api.github.com/repos/airbnb/caravel/pulls/977/comments","review_comment_url":"https://api.github.com/repos/airbnb/caravel/pulls/comments{/number}","comments_url":"https://api.github.com/repos/airbnb/caravel/issues/977/comments","statuses_url":"https://api.github.com/repos/airbnb/caravel/statuses/e264d201df217ef463e4d901635289344cb2d20d","head":{"label":"linroex:master","ref":"master","sha":"e264d201df217ef463e4d901635289344cb2d20d","user":{"login":"linroex","id":1254953,"avatar_url":"https://avatars.githubusercontent.com/u/1254953?v=3","gravatar_id":"","url":"https://api.github.com/users/linroex","html_url":"https://github.com/linroex","followers_url":"https://api.github.com/users/linroex/followers","following_url":"https://api.github.com/users/linroex/following{/other_user}","gists_url":"https://api.github.com/users/linroex/gists{/gist_id}","starred_url":"https://api.github.com/users/linroex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/linroex/subscriptions","organizations_url":"https://api.github.com/users/linroex/orgs","repos_url":"https://api.github.com/users/linroex/repos","events_url":"https://api.github.com/users/linroex/events{/privacy}","received_events_url":"https://api.github.com/users/linroex/received_events","type":"User","site_admin":false},"repo":{"id":64363184,"name":"caravel","full_name":"linroex/caravel","owner":{"login":"linroex","id":1254953,"avatar_url":"https://avatars.githubusercontent.com/u/1254953?v=3","gravatar_id":"","url":"https://api.github.com/users/linroex","html_url":"https://github.com/linroex","followers_url":"https://api.github.com/users/linroex/followers","following_url":"https://api.github.com/users/linroex/following{/other_user}","gists_url":"https://api.github.com/users/linroex/gists{/gist_id}","starred_url":"https://api.github.com/users/linroex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/linroex/subscriptions","organizations_url":"https://api.github.com/users/linroex/orgs","repos_url":"https://api.github.com/users/linroex/repos","events_url":"https://api.github.com/users/linroex/events{/privacy}","received_events_url":"https://api.github.com/users/linroex/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/linroex/caravel","description":"Caravel is a data exploration platform designed to be visual, intuitive, and interactive","fork":true,"url":"https://api.github.com/repos/linroex/caravel","forks_url":"https://api.github.com/repos/linroex/caravel/forks","keys_url":"https://api.github.com/repos/linroex/caravel/keys{/key_id}","collaborators_url":"https://api.github.com/repos/linroex/caravel/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/linroex/caravel/teams","hooks_url":"https://api.github.com/repos/linroex/caravel/hooks","issue_events_url":"https://api.github.com/repos/linroex/caravel/issues/events{/number}","events_url":"https://api.github.com/repos/linroex/caravel/events","assignees_url":"https://api.github.com/repos/linroex/caravel/assignees{/user}","branches_url":"https://api.github.com/repos/linroex/caravel/branches{/branch}","tags_url":"https://api.github.com/repos/linroex/caravel/tags","blobs_url":"https://api.github.com/repos/linroex/caravel/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/linroex/caravel/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/linroex/caravel/git/refs{/sha}","trees_url":"https://api.github.com/repos/linroex/caravel/git/trees{/sha}","statuses_url":"https://api.github.com/repos/linroex/caravel/statuses/{sha}","languages_url":"https://api.github.com/repos/linroex/caravel/languages","stargazers_url":"https://api.github.com/repos/linroex/caravel/stargazers","contributors_url":"https://api.github.com/repos/linroex/caravel/contributors","subscribers_url":"https://api.github.com/repos/linroex/caravel/subscribers","subscription_url":"https://api.github.com/repos/linroex/caravel/subscription","commits_url":"https://api.github.com/repos/linroex/caravel/commits{/sha}","git_commits_url":"https://api.github.com/repos/linroex/caravel/git/commits{/sha}","comments_url":"https://api.github.com/repos/linroex/caravel/comments{/number}","issue_comment_url":"https://api.github.com/repos/linroex/caravel/issues/comments{/number}","contents_url":"https://api.github.com/repos/linroex/caravel/contents/{+path}","compare_url":"https://api.github.com/repos/linroex/caravel/compare/{base}...{head}","merges_url":"https://api.github.com/repos/linroex/caravel/merges","archive_url":"https://api.github.com/repos/linroex/caravel/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/linroex/caravel/downloads","issues_url":"https://api.github.com/repos/linroex/caravel/issues{/number}","pulls_url":"https://api.github.com/repos/linroex/caravel/pulls{/number}","milestones_url":"https://api.github.com/repos/linroex/caravel/milestones{/number}","notifications_url":"https://api.github.com/repos/linroex/caravel/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/linroex/caravel/labels{/name}","releases_url":"https://api.github.com/repos/linroex/caravel/releases{/id}","deployments_url":"https://api.github.com/repos/linroex/caravel/deployments","created_at":"2016-07-28T04:02:43Z","updated_at":"2016-07-28T04:02:44Z","pushed_at":"2016-08-19T08:03:19Z","git_url":"git://github.com/linroex/caravel.git","ssh_url":"git@github.com:linroex/caravel.git","clone_url":"https://github.com/linroex/caravel.git","svn_url":"https://github.com/linroex/caravel","homepage":"","size":36925,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"airbnb:master","ref":"master","sha":"30ef8eba37073c2cb0d2a6356fe3a9bcabab4913","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-08-23T08:57:00Z","pushed_at":"2016-08-23T07:13:38Z","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":40064,"stargazers_count":7031,"watchers_count":7031,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":762,"mirror_url":null,"open_issues_count":210,"forks":762,"open_issues":210,"watchers":7031,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/airbnb/caravel/pulls/977"},"html":{"href":"https://github.com/airbnb/caravel/pull/977"},"issue":{"href":"https://api.github.com/repos/airbnb/caravel/issues/977"},"comments":{"href":"https://api.github.com/repos/airbnb/caravel/issues/977/comments"},"review_comments":{"href":"https://api.github.com/repos/airbnb/caravel/pulls/977/comments"},"review_comment":{"href":"https://api.github.com/repos/airbnb/caravel/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/airbnb/caravel/pulls/977/commits"},"statuses":{"href":"https://api.github.com/repos/airbnb/caravel/statuses/e264d201df217ef463e4d901635289344cb2d20d"}}}}
{"actor":{"display_login":"xrmx"}}