{"action":"created","comment":{"url":"https://api.github.com/repos/rstats-db/bigrquery/pulls/comments/51228128","id":51228128,"diff_hunk":"@@ -0,0 +1,68 @@\n+#' Parse a BQ-style identifier into project/dataset IDs.\n+#'\n+#' @param dataset dataset name\n+#' @param project_id (optional) project ID to use if none is provided\n+#' in \\code{dataset}\n+#' @return a list with \\code{project_id} and \\code{dataset_id} components\n+#' (either of which may be \\code{NULL}).\n+#' @family identifier functions\n+#' @export\n+parse_dataset <- function(dataset, project_id = NULL) {\n+  assert_that(is.string(dataset), is.null(project_id) || is.string(project_id))\n+  first_split <- rsplit_one(dataset, \":\")\n+  dataset_id <- first_split$right\n+  project_id <- first_split$left %||% project_id\n+  list(project_id = project_id, dataset_id = dataset_id)\n+}\n+\n+#' Format dataset and project ID as a BQ-style identifier","path":"R/id.R","position":18,"original_position":18,"commit_id":"2af152b9dd028988b5eecba2faa6d19a24133277","original_commit_id":"2af152b9dd028988b5eecba2faa6d19a24133277","user":{"login":"craigcitro","id":468559,"avatar_url":"https://avatars.githubusercontent.com/u/468559?v=3","gravatar_id":"","url":"https://api.github.com/users/craigcitro","html_url":"https://github.com/craigcitro","followers_url":"https://api.github.com/users/craigcitro/followers","following_url":"https://api.github.com/users/craigcitro/following{/other_user}","gists_url":"https://api.github.com/users/craigcitro/gists{/gist_id}","starred_url":"https://api.github.com/users/craigcitro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/craigcitro/subscriptions","organizations_url":"https://api.github.com/users/craigcitro/orgs","repos_url":"https://api.github.com/users/craigcitro/repos","events_url":"https://api.github.com/users/craigcitro/events{/privacy}","received_events_url":"https://api.github.com/users/craigcitro/received_events","type":"User","site_admin":false},"body":"identifier.","created_at":"2016-01-29T05:50:27Z","updated_at":"2016-01-29T05:50:27Z","html_url":"https://github.com/rstats-db/bigrquery/pull/81#discussion_r51228128","pull_request_url":"https://api.github.com/repos/rstats-db/bigrquery/pulls/81","_links":{"self":{"href":"https://api.github.com/repos/rstats-db/bigrquery/pulls/comments/51228128"},"html":{"href":"https://github.com/rstats-db/bigrquery/pull/81#discussion_r51228128"},"pull_request":{"href":"https://api.github.com/repos/rstats-db/bigrquery/pulls/81"}}},"pull_request":{"url":"https://api.github.com/repos/rstats-db/bigrquery/pulls/81","id":57194291,"html_url":"https://github.com/rstats-db/bigrquery/pull/81","diff_url":"https://github.com/rstats-db/bigrquery/pull/81.diff","patch_url":"https://github.com/rstats-db/bigrquery/pull/81.patch","issue_url":"https://api.github.com/repos/rstats-db/bigrquery/issues/81","number":81,"state":"open","locked":false,"title":"New format_dataset() and format_table()","user":{"login":"krlmlr","id":1741643,"avatar_url":"https://avatars.githubusercontent.com/u/1741643?v=3","gravatar_id":"","url":"https://api.github.com/users/krlmlr","html_url":"https://github.com/krlmlr","followers_url":"https://api.github.com/users/krlmlr/followers","following_url":"https://api.github.com/users/krlmlr/following{/other_user}","gists_url":"https://api.github.com/users/krlmlr/gists{/gist_id}","starred_url":"https://api.github.com/users/krlmlr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krlmlr/subscriptions","organizations_url":"https://api.github.com/users/krlmlr/orgs","repos_url":"https://api.github.com/users/krlmlr/repos","events_url":"https://api.github.com/users/krlmlr/events{/privacy}","received_events_url":"https://api.github.com/users/krlmlr/received_events","type":"User","site_admin":false},"body":"as complement to parse_*().\n\n@craigcitro: Okay to create a new file for these functions and move them out of utils.R? If not, I'll revert that particular change before adding tests.","created_at":"2016-01-26T10:42:24Z","updated_at":"2016-01-29T05:50:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f760d57bf8183007bbe8e19934605b7f96e28b26","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/rstats-db/bigrquery/pulls/81/commits","review_comments_url":"https://api.github.com/repos/rstats-db/bigrquery/pulls/81/comments","review_comment_url":"https://api.github.com/repos/rstats-db/bigrquery/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rstats-db/bigrquery/issues/81/comments","statuses_url":"https://api.github.com/repos/rstats-db/bigrquery/statuses/2af152b9dd028988b5eecba2faa6d19a24133277","head":{"label":"krlmlr:feature/format","ref":"feature/format","sha":"2af152b9dd028988b5eecba2faa6d19a24133277","user":{"login":"krlmlr","id":1741643,"avatar_url":"https://avatars.githubusercontent.com/u/1741643?v=3","gravatar_id":"","url":"https://api.github.com/users/krlmlr","html_url":"https://github.com/krlmlr","followers_url":"https://api.github.com/users/krlmlr/followers","following_url":"https://api.github.com/users/krlmlr/following{/other_user}","gists_url":"https://api.github.com/users/krlmlr/gists{/gist_id}","starred_url":"https://api.github.com/users/krlmlr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krlmlr/subscriptions","organizations_url":"https://api.github.com/users/krlmlr/orgs","repos_url":"https://api.github.com/users/krlmlr/repos","events_url":"https://api.github.com/users/krlmlr/events{/privacy}","received_events_url":"https://api.github.com/users/krlmlr/received_events","type":"User","site_admin":false},"repo":{"id":48481426,"name":"bigrquery","full_name":"krlmlr/bigrquery","owner":{"login":"krlmlr","id":1741643,"avatar_url":"https://avatars.githubusercontent.com/u/1741643?v=3","gravatar_id":"","url":"https://api.github.com/users/krlmlr","html_url":"https://github.com/krlmlr","followers_url":"https://api.github.com/users/krlmlr/followers","following_url":"https://api.github.com/users/krlmlr/following{/other_user}","gists_url":"https://api.github.com/users/krlmlr/gists{/gist_id}","starred_url":"https://api.github.com/users/krlmlr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krlmlr/subscriptions","organizations_url":"https://api.github.com/users/krlmlr/orgs","repos_url":"https://api.github.com/users/krlmlr/repos","events_url":"https://api.github.com/users/krlmlr/events{/privacy}","received_events_url":"https://api.github.com/users/krlmlr/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/krlmlr/bigrquery","description":"An interface to Google's bigquery from R.","fork":true,"url":"https://api.github.com/repos/krlmlr/bigrquery","forks_url":"https://api.github.com/repos/krlmlr/bigrquery/forks","keys_url":"https://api.github.com/repos/krlmlr/bigrquery/keys{/key_id}","collaborators_url":"https://api.github.com/repos/krlmlr/bigrquery/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/krlmlr/bigrquery/teams","hooks_url":"https://api.github.com/repos/krlmlr/bigrquery/hooks","issue_events_url":"https://api.github.com/repos/krlmlr/bigrquery/issues/events{/number}","events_url":"https://api.github.com/repos/krlmlr/bigrquery/events","assignees_url":"https://api.github.com/repos/krlmlr/bigrquery/assignees{/user}","branches_url":"https://api.github.com/repos/krlmlr/bigrquery/branches{/branch}","tags_url":"https://api.github.com/repos/krlmlr/bigrquery/tags","blobs_url":"https://api.github.com/repos/krlmlr/bigrquery/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/krlmlr/bigrquery/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/krlmlr/bigrquery/git/refs{/sha}","trees_url":"https://api.github.com/repos/krlmlr/bigrquery/git/trees{/sha}","statuses_url":"https://api.github.com/repos/krlmlr/bigrquery/statuses/{sha}","languages_url":"https://api.github.com/repos/krlmlr/bigrquery/languages","stargazers_url":"https://api.github.com/repos/krlmlr/bigrquery/stargazers","contributors_url":"https://api.github.com/repos/krlmlr/bigrquery/contributors","subscribers_url":"https://api.github.com/repos/krlmlr/bigrquery/subscribers","subscription_url":"https://api.github.com/repos/krlmlr/bigrquery/subscription","commits_url":"https://api.github.com/repos/krlmlr/bigrquery/commits{/sha}","git_commits_url":"https://api.github.com/repos/krlmlr/bigrquery/git/commits{/sha}","comments_url":"https://api.github.com/repos/krlmlr/bigrquery/comments{/number}","issue_comment_url":"https://api.github.com/repos/krlmlr/bigrquery/issues/comments{/number}","contents_url":"https://api.github.com/repos/krlmlr/bigrquery/contents/{+path}","compare_url":"https://api.github.com/repos/krlmlr/bigrquery/compare/{base}...{head}","merges_url":"https://api.github.com/repos/krlmlr/bigrquery/merges","archive_url":"https://api.github.com/repos/krlmlr/bigrquery/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/krlmlr/bigrquery/downloads","issues_url":"https://api.github.com/repos/krlmlr/bigrquery/issues{/number}","pulls_url":"https://api.github.com/repos/krlmlr/bigrquery/pulls{/number}","milestones_url":"https://api.github.com/repos/krlmlr/bigrquery/milestones{/number}","notifications_url":"https://api.github.com/repos/krlmlr/bigrquery/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/krlmlr/bigrquery/labels{/name}","releases_url":"https://api.github.com/repos/krlmlr/bigrquery/releases{/id}","deployments_url":"https://api.github.com/repos/krlmlr/bigrquery/deployments","created_at":"2015-12-23T09:22:07Z","updated_at":"2016-01-25T09:38:42Z","pushed_at":"2016-01-26T16:18:05Z","git_url":"git://github.com/krlmlr/bigrquery.git","ssh_url":"git@github.com:krlmlr/bigrquery.git","clone_url":"https://github.com/krlmlr/bigrquery.git","svn_url":"https://github.com/krlmlr/bigrquery","homepage":null,"size":188,"stargazers_count":0,"watchers_count":0,"language":"R","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"rstats-db:master","ref":"master","sha":"3cb19d1bc0c85847304383616e24f990fcdffaac","user":{"login":"rstats-db","id":5695665,"avatar_url":"https://avatars.githubusercontent.com/u/5695665?v=3","gravatar_id":"","url":"https://api.github.com/users/rstats-db","html_url":"https://github.com/rstats-db","followers_url":"https://api.github.com/users/rstats-db/followers","following_url":"https://api.github.com/users/rstats-db/following{/other_user}","gists_url":"https://api.github.com/users/rstats-db/gists{/gist_id}","starred_url":"https://api.github.com/users/rstats-db/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rstats-db/subscriptions","organizations_url":"https://api.github.com/users/rstats-db/orgs","repos_url":"https://api.github.com/users/rstats-db/repos","events_url":"https://api.github.com/users/rstats-db/events{/privacy}","received_events_url":"https://api.github.com/users/rstats-db/received_events","type":"Organization","site_admin":false},"repo":{"id":10221246,"name":"bigrquery","full_name":"rstats-db/bigrquery","owner":{"login":"rstats-db","id":5695665,"avatar_url":"https://avatars.githubusercontent.com/u/5695665?v=3","gravatar_id":"","url":"https://api.github.com/users/rstats-db","html_url":"https://github.com/rstats-db","followers_url":"https://api.github.com/users/rstats-db/followers","following_url":"https://api.github.com/users/rstats-db/following{/other_user}","gists_url":"https://api.github.com/users/rstats-db/gists{/gist_id}","starred_url":"https://api.github.com/users/rstats-db/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rstats-db/subscriptions","organizations_url":"https://api.github.com/users/rstats-db/orgs","repos_url":"https://api.github.com/users/rstats-db/repos","events_url":"https://api.github.com/users/rstats-db/events{/privacy}","received_events_url":"https://api.github.com/users/rstats-db/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rstats-db/bigrquery","description":"An interface to Google's bigquery from R.","fork":false,"url":"https://api.github.com/repos/rstats-db/bigrquery","forks_url":"https://api.github.com/repos/rstats-db/bigrquery/forks","keys_url":"https://api.github.com/repos/rstats-db/bigrquery/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rstats-db/bigrquery/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rstats-db/bigrquery/teams","hooks_url":"https://api.github.com/repos/rstats-db/bigrquery/hooks","issue_events_url":"https://api.github.com/repos/rstats-db/bigrquery/issues/events{/number}","events_url":"https://api.github.com/repos/rstats-db/bigrquery/events","assignees_url":"https://api.github.com/repos/rstats-db/bigrquery/assignees{/user}","branches_url":"https://api.github.com/repos/rstats-db/bigrquery/branches{/branch}","tags_url":"https://api.github.com/repos/rstats-db/bigrquery/tags","blobs_url":"https://api.github.com/repos/rstats-db/bigrquery/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rstats-db/bigrquery/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rstats-db/bigrquery/git/refs{/sha}","trees_url":"https://api.github.com/repos/rstats-db/bigrquery/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rstats-db/bigrquery/statuses/{sha}","languages_url":"https://api.github.com/repos/rstats-db/bigrquery/languages","stargazers_url":"https://api.github.com/repos/rstats-db/bigrquery/stargazers","contributors_url":"https://api.github.com/repos/rstats-db/bigrquery/contributors","subscribers_url":"https://api.github.com/repos/rstats-db/bigrquery/subscribers","subscription_url":"https://api.github.com/repos/rstats-db/bigrquery/subscription","commits_url":"https://api.github.com/repos/rstats-db/bigrquery/commits{/sha}","git_commits_url":"https://api.github.com/repos/rstats-db/bigrquery/git/commits{/sha}","comments_url":"https://api.github.com/repos/rstats-db/bigrquery/comments{/number}","issue_comment_url":"https://api.github.com/repos/rstats-db/bigrquery/issues/comments{/number}","contents_url":"https://api.github.com/repos/rstats-db/bigrquery/contents/{+path}","compare_url":"https://api.github.com/repos/rstats-db/bigrquery/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rstats-db/bigrquery/merges","archive_url":"https://api.github.com/repos/rstats-db/bigrquery/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rstats-db/bigrquery/downloads","issues_url":"https://api.github.com/repos/rstats-db/bigrquery/issues{/number}","pulls_url":"https://api.github.com/repos/rstats-db/bigrquery/pulls{/number}","milestones_url":"https://api.github.com/repos/rstats-db/bigrquery/milestones{/number}","notifications_url":"https://api.github.com/repos/rstats-db/bigrquery/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rstats-db/bigrquery/labels{/name}","releases_url":"https://api.github.com/repos/rstats-db/bigrquery/releases{/id}","deployments_url":"https://api.github.com/repos/rstats-db/bigrquery/deployments","created_at":"2013-05-22T14:04:16Z","updated_at":"2016-01-27T14:24:01Z","pushed_at":"2016-01-28T19:17:00Z","git_url":"git://github.com/rstats-db/bigrquery.git","ssh_url":"git@github.com:rstats-db/bigrquery.git","clone_url":"https://github.com/rstats-db/bigrquery.git","svn_url":"https://github.com/rstats-db/bigrquery","homepage":null,"size":251,"stargazers_count":125,"watchers_count":125,"language":"R","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":52,"mirror_url":null,"open_issues_count":24,"forks":52,"open_issues":24,"watchers":125,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rstats-db/bigrquery/pulls/81"},"html":{"href":"https://github.com/rstats-db/bigrquery/pull/81"},"issue":{"href":"https://api.github.com/repos/rstats-db/bigrquery/issues/81"},"comments":{"href":"https://api.github.com/repos/rstats-db/bigrquery/issues/81/comments"},"review_comments":{"href":"https://api.github.com/repos/rstats-db/bigrquery/pulls/81/comments"},"review_comment":{"href":"https://api.github.com/repos/rstats-db/bigrquery/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rstats-db/bigrquery/pulls/81/commits"},"statuses":{"href":"https://api.github.com/repos/rstats-db/bigrquery/statuses/2af152b9dd028988b5eecba2faa6d19a24133277"}}}}