{"action":"closed","number":150,"pull_request":{"url":"https://api.github.com/repos/pydata/pandas-gbq/pulls/150","id":175006756,"html_url":"https://github.com/pydata/pandas-gbq/pull/150","diff_url":"https://github.com/pydata/pandas-gbq/pull/150.diff","patch_url":"https://github.com/pydata/pandas-gbq/pull/150.patch","issue_url":"https://api.github.com/repos/pydata/pandas-gbq/issues/150","number":150,"state":"closed","locked":false,"title":"Load data with user defined schema","user":{"login":"aktech","id":5647941,"avatar_url":"https://avatars2.githubusercontent.com/u/5647941?v=4","gravatar_id":"","url":"https://api.github.com/users/aktech","html_url":"https://github.com/aktech","followers_url":"https://api.github.com/users/aktech/followers","following_url":"https://api.github.com/users/aktech/following{/other_user}","gists_url":"https://api.github.com/users/aktech/gists{/gist_id}","starred_url":"https://api.github.com/users/aktech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aktech/subscriptions","organizations_url":"https://api.github.com/users/aktech/orgs","repos_url":"https://api.github.com/users/aktech/repos","events_url":"https://api.github.com/users/aktech/events{/privacy}","received_events_url":"https://api.github.com/users/aktech/received_events","type":"User","site_admin":false},"body":"The `to_gbp` function fails when there is a user-defined schema which is slightly different from the schema of DataFrame.\r\n\r\nTraceback:\r\n\r\n```\r\nTraceback (most recent call last):\r\n  File \"<stdin>\", line 4, in <module>\r\n  File \"pandas_gbq/gbq.py\", line 979, in to_gbq\r\n    schema=table_schema)\r\n  File \"pandas_gbq/gbq.py\", line 569, in load_data\r\n    self.process_http_error(ex)\r\n  File \"pandas_gbq/gbq.py\", line 450, in process_http_error\r\n    raise GenericGBQException(\"Reason: {0}\".format(ex))\r\npandas_gbq.gbq.GenericGBQException: Reason: 400 POST https://www.googleapis.com/upload/bigquery/v2/projects/aktech-labs/jobs?uploadType=resumable: Provided Schema does not match Table aktech-labs:pandas_test.gamma. Field A has changed type from FLOAT to STRING\r\n```\r\n\r\nThe primary reason for this is that the `load_data` function ignores the `schema` argument.\r\n\r\nSolution: The `schema` argument is now passed to the `load_chunks` function inside `load_data` function. A suitable integration test has been added.","created_at":"2018-03-14T16:10:21Z","updated_at":"2018-03-14T20:20:49Z","closed_at":"2018-03-14T20:20:49Z","merged_at":"2018-03-14T20:20:49Z","merge_commit_sha":"9a9a48ee9e5c0b454c6ce1c974b3402fe69fca50","assignee":{"login":"maxim-lian","id":5635139,"avatar_url":"https://avatars0.githubusercontent.com/u/5635139?v=4","gravatar_id":"","url":"https://api.github.com/users/maxim-lian","html_url":"https://github.com/maxim-lian","followers_url":"https://api.github.com/users/maxim-lian/followers","following_url":"https://api.github.com/users/maxim-lian/following{/other_user}","gists_url":"https://api.github.com/users/maxim-lian/gists{/gist_id}","starred_url":"https://api.github.com/users/maxim-lian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maxim-lian/subscriptions","organizations_url":"https://api.github.com/users/maxim-lian/orgs","repos_url":"https://api.github.com/users/maxim-lian/repos","events_url":"https://api.github.com/users/maxim-lian/events{/privacy}","received_events_url":"https://api.github.com/users/maxim-lian/received_events","type":"User","site_admin":false},"assignees":[{"login":"maxim-lian","id":5635139,"avatar_url":"https://avatars0.githubusercontent.com/u/5635139?v=4","gravatar_id":"","url":"https://api.github.com/users/maxim-lian","html_url":"https://github.com/maxim-lian","followers_url":"https://api.github.com/users/maxim-lian/followers","following_url":"https://api.github.com/users/maxim-lian/following{/other_user}","gists_url":"https://api.github.com/users/maxim-lian/gists{/gist_id}","starred_url":"https://api.github.com/users/maxim-lian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maxim-lian/subscriptions","organizations_url":"https://api.github.com/users/maxim-lian/orgs","repos_url":"https://api.github.com/users/maxim-lian/repos","events_url":"https://api.github.com/users/maxim-lian/events{/privacy}","received_events_url":"https://api.github.com/users/maxim-lian/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/pydata/pandas-gbq/pulls/150/commits","review_comments_url":"https://api.github.com/repos/pydata/pandas-gbq/pulls/150/comments","review_comment_url":"https://api.github.com/repos/pydata/pandas-gbq/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pydata/pandas-gbq/issues/150/comments","statuses_url":"https://api.github.com/repos/pydata/pandas-gbq/statuses/c563fc35de08cdcc05cbeca50c2a60a36cb4b2a9","head":{"label":"aktech:load_data_with_schema","ref":"load_data_with_schema","sha":"c563fc35de08cdcc05cbeca50c2a60a36cb4b2a9","user":{"login":"aktech","id":5647941,"avatar_url":"https://avatars2.githubusercontent.com/u/5647941?v=4","gravatar_id":"","url":"https://api.github.com/users/aktech","html_url":"https://github.com/aktech","followers_url":"https://api.github.com/users/aktech/followers","following_url":"https://api.github.com/users/aktech/following{/other_user}","gists_url":"https://api.github.com/users/aktech/gists{/gist_id}","starred_url":"https://api.github.com/users/aktech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aktech/subscriptions","organizations_url":"https://api.github.com/users/aktech/orgs","repos_url":"https://api.github.com/users/aktech/repos","events_url":"https://api.github.com/users/aktech/events{/privacy}","received_events_url":"https://api.github.com/users/aktech/received_events","type":"User","site_admin":false},"repo":{"id":125204978,"name":"pandas-gbq","full_name":"aktech/pandas-gbq","owner":{"login":"aktech","id":5647941,"avatar_url":"https://avatars2.githubusercontent.com/u/5647941?v=4","gravatar_id":"","url":"https://api.github.com/users/aktech","html_url":"https://github.com/aktech","followers_url":"https://api.github.com/users/aktech/followers","following_url":"https://api.github.com/users/aktech/following{/other_user}","gists_url":"https://api.github.com/users/aktech/gists{/gist_id}","starred_url":"https://api.github.com/users/aktech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aktech/subscriptions","organizations_url":"https://api.github.com/users/aktech/orgs","repos_url":"https://api.github.com/users/aktech/repos","events_url":"https://api.github.com/users/aktech/events{/privacy}","received_events_url":"https://api.github.com/users/aktech/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/aktech/pandas-gbq","description":"Pandas Google Big Query","fork":true,"url":"https://api.github.com/repos/aktech/pandas-gbq","forks_url":"https://api.github.com/repos/aktech/pandas-gbq/forks","keys_url":"https://api.github.com/repos/aktech/pandas-gbq/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aktech/pandas-gbq/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aktech/pandas-gbq/teams","hooks_url":"https://api.github.com/repos/aktech/pandas-gbq/hooks","issue_events_url":"https://api.github.com/repos/aktech/pandas-gbq/issues/events{/number}","events_url":"https://api.github.com/repos/aktech/pandas-gbq/events","assignees_url":"https://api.github.com/repos/aktech/pandas-gbq/assignees{/user}","branches_url":"https://api.github.com/repos/aktech/pandas-gbq/branches{/branch}","tags_url":"https://api.github.com/repos/aktech/pandas-gbq/tags","blobs_url":"https://api.github.com/repos/aktech/pandas-gbq/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aktech/pandas-gbq/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aktech/pandas-gbq/git/refs{/sha}","trees_url":"https://api.github.com/repos/aktech/pandas-gbq/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aktech/pandas-gbq/statuses/{sha}","languages_url":"https://api.github.com/repos/aktech/pandas-gbq/languages","stargazers_url":"https://api.github.com/repos/aktech/pandas-gbq/stargazers","contributors_url":"https://api.github.com/repos/aktech/pandas-gbq/contributors","subscribers_url":"https://api.github.com/repos/aktech/pandas-gbq/subscribers","subscription_url":"https://api.github.com/repos/aktech/pandas-gbq/subscription","commits_url":"https://api.github.com/repos/aktech/pandas-gbq/commits{/sha}","git_commits_url":"https://api.github.com/repos/aktech/pandas-gbq/git/commits{/sha}","comments_url":"https://api.github.com/repos/aktech/pandas-gbq/comments{/number}","issue_comment_url":"https://api.github.com/repos/aktech/pandas-gbq/issues/comments{/number}","contents_url":"https://api.github.com/repos/aktech/pandas-gbq/contents/{+path}","compare_url":"https://api.github.com/repos/aktech/pandas-gbq/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aktech/pandas-gbq/merges","archive_url":"https://api.github.com/repos/aktech/pandas-gbq/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aktech/pandas-gbq/downloads","issues_url":"https://api.github.com/repos/aktech/pandas-gbq/issues{/number}","pulls_url":"https://api.github.com/repos/aktech/pandas-gbq/pulls{/number}","milestones_url":"https://api.github.com/repos/aktech/pandas-gbq/milestones{/number}","notifications_url":"https://api.github.com/repos/aktech/pandas-gbq/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aktech/pandas-gbq/labels{/name}","releases_url":"https://api.github.com/repos/aktech/pandas-gbq/releases{/id}","deployments_url":"https://api.github.com/repos/aktech/pandas-gbq/deployments","created_at":"2018-03-14T11:52:37Z","updated_at":"2018-03-14T11:52:39Z","pushed_at":"2018-03-14T16:05:39Z","git_url":"git://github.com/aktech/pandas-gbq.git","ssh_url":"git@github.com:aktech/pandas-gbq.git","clone_url":"https://github.com/aktech/pandas-gbq.git","svn_url":"https://github.com/aktech/pandas-gbq","homepage":null,"size":381,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"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":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"pydata:master","ref":"master","sha":"ed178867d09fee00e95d9baf5a83b7ec8356c509","user":{"login":"pydata","id":1284191,"avatar_url":"https://avatars0.githubusercontent.com/u/1284191?v=4","gravatar_id":"","url":"https://api.github.com/users/pydata","html_url":"https://github.com/pydata","followers_url":"https://api.github.com/users/pydata/followers","following_url":"https://api.github.com/users/pydata/following{/other_user}","gists_url":"https://api.github.com/users/pydata/gists{/gist_id}","starred_url":"https://api.github.com/users/pydata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pydata/subscriptions","organizations_url":"https://api.github.com/users/pydata/orgs","repos_url":"https://api.github.com/users/pydata/repos","events_url":"https://api.github.com/users/pydata/events{/privacy}","received_events_url":"https://api.github.com/users/pydata/received_events","type":"Organization","site_admin":false},"repo":{"id":81330959,"name":"pandas-gbq","full_name":"pydata/pandas-gbq","owner":{"login":"pydata","id":1284191,"avatar_url":"https://avatars0.githubusercontent.com/u/1284191?v=4","gravatar_id":"","url":"https://api.github.com/users/pydata","html_url":"https://github.com/pydata","followers_url":"https://api.github.com/users/pydata/followers","following_url":"https://api.github.com/users/pydata/following{/other_user}","gists_url":"https://api.github.com/users/pydata/gists{/gist_id}","starred_url":"https://api.github.com/users/pydata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pydata/subscriptions","organizations_url":"https://api.github.com/users/pydata/orgs","repos_url":"https://api.github.com/users/pydata/repos","events_url":"https://api.github.com/users/pydata/events{/privacy}","received_events_url":"https://api.github.com/users/pydata/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/pydata/pandas-gbq","description":"Pandas Google Big Query","fork":false,"url":"https://api.github.com/repos/pydata/pandas-gbq","forks_url":"https://api.github.com/repos/pydata/pandas-gbq/forks","keys_url":"https://api.github.com/repos/pydata/pandas-gbq/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pydata/pandas-gbq/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pydata/pandas-gbq/teams","hooks_url":"https://api.github.com/repos/pydata/pandas-gbq/hooks","issue_events_url":"https://api.github.com/repos/pydata/pandas-gbq/issues/events{/number}","events_url":"https://api.github.com/repos/pydata/pandas-gbq/events","assignees_url":"https://api.github.com/repos/pydata/pandas-gbq/assignees{/user}","branches_url":"https://api.github.com/repos/pydata/pandas-gbq/branches{/branch}","tags_url":"https://api.github.com/repos/pydata/pandas-gbq/tags","blobs_url":"https://api.github.com/repos/pydata/pandas-gbq/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pydata/pandas-gbq/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pydata/pandas-gbq/git/refs{/sha}","trees_url":"https://api.github.com/repos/pydata/pandas-gbq/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pydata/pandas-gbq/statuses/{sha}","languages_url":"https://api.github.com/repos/pydata/pandas-gbq/languages","stargazers_url":"https://api.github.com/repos/pydata/pandas-gbq/stargazers","contributors_url":"https://api.github.com/repos/pydata/pandas-gbq/contributors","subscribers_url":"https://api.github.com/repos/pydata/pandas-gbq/subscribers","subscription_url":"https://api.github.com/repos/pydata/pandas-gbq/subscription","commits_url":"https://api.github.com/repos/pydata/pandas-gbq/commits{/sha}","git_commits_url":"https://api.github.com/repos/pydata/pandas-gbq/git/commits{/sha}","comments_url":"https://api.github.com/repos/pydata/pandas-gbq/comments{/number}","issue_comment_url":"https://api.github.com/repos/pydata/pandas-gbq/issues/comments{/number}","contents_url":"https://api.github.com/repos/pydata/pandas-gbq/contents/{+path}","compare_url":"https://api.github.com/repos/pydata/pandas-gbq/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pydata/pandas-gbq/merges","archive_url":"https://api.github.com/repos/pydata/pandas-gbq/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pydata/pandas-gbq/downloads","issues_url":"https://api.github.com/repos/pydata/pandas-gbq/issues{/number}","pulls_url":"https://api.github.com/repos/pydata/pandas-gbq/pulls{/number}","milestones_url":"https://api.github.com/repos/pydata/pandas-gbq/milestones{/number}","notifications_url":"https://api.github.com/repos/pydata/pandas-gbq/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pydata/pandas-gbq/labels{/name}","releases_url":"https://api.github.com/repos/pydata/pandas-gbq/releases{/id}","deployments_url":"https://api.github.com/repos/pydata/pandas-gbq/deployments","created_at":"2017-02-08T13:07:19Z","updated_at":"2018-03-14T07:15:37Z","pushed_at":"2018-03-14T20:20:49Z","git_url":"git://github.com/pydata/pandas-gbq.git","ssh_url":"git@github.com:pydata/pandas-gbq.git","clone_url":"https://github.com/pydata/pandas-gbq.git","svn_url":"https://github.com/pydata/pandas-gbq","homepage":null,"size":367,"stargazers_count":67,"watchers_count":67,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":40,"mirror_url":null,"archived":false,"open_issues_count":47,"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":40,"open_issues":47,"watchers":67,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pydata/pandas-gbq/pulls/150"},"html":{"href":"https://github.com/pydata/pandas-gbq/pull/150"},"issue":{"href":"https://api.github.com/repos/pydata/pandas-gbq/issues/150"},"comments":{"href":"https://api.github.com/repos/pydata/pandas-gbq/issues/150/comments"},"review_comments":{"href":"https://api.github.com/repos/pydata/pandas-gbq/pulls/150/comments"},"review_comment":{"href":"https://api.github.com/repos/pydata/pandas-gbq/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pydata/pandas-gbq/pulls/150/commits"},"statuses":{"href":"https://api.github.com/repos/pydata/pandas-gbq/statuses/c563fc35de08cdcc05cbeca50c2a60a36cb4b2a9"}},"author_association":"NONE","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"maxim-lian","id":5635139,"avatar_url":"https://avatars0.githubusercontent.com/u/5635139?v=4","gravatar_id":"","url":"https://api.github.com/users/maxim-lian","html_url":"https://github.com/maxim-lian","followers_url":"https://api.github.com/users/maxim-lian/followers","following_url":"https://api.github.com/users/maxim-lian/following{/other_user}","gists_url":"https://api.github.com/users/maxim-lian/gists{/gist_id}","starred_url":"https://api.github.com/users/maxim-lian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maxim-lian/subscriptions","organizations_url":"https://api.github.com/users/maxim-lian/orgs","repos_url":"https://api.github.com/users/maxim-lian/repos","events_url":"https://api.github.com/users/maxim-lian/events{/privacy}","received_events_url":"https://api.github.com/users/maxim-lian/received_events","type":"User","site_admin":false},"comments":4,"review_comments":0,"maintainer_can_modify":false,"commits":2,"additions":18,"deletions":1,"changed_files":2}}
{"actor":{"display_login":"maxim-lian"}}