{"action":"created","comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/pulls/comments/78793864","id":78793864,"diff_hunk":"@@ -288,6 +288,58 @@ def _has_rows(result):\n         self.assertEqual(sorted(rows, key=by_age),\n                          sorted(ROWS, key=by_age))\n \n+    def test_load_table_from_local_file_then_dump_table(self):\n+        import csv\n+        import tempfile\n+        local_id = unique_resource_id()\n+        BUCKET_NAME = 'bq_load_test' + local_id\n+        BLOB_NAME = 'person_ages.csv'\n+        GS_URL = 'gs://%s/%s' % (BUCKET_NAME, BLOB_NAME)\n+        ROWS = [\n+            ('Phred Phlyntstone', 32),\n+            ('Bharney Rhubble', 33),\n+            ('Wylma Phlyntstone', 29),\n+            ('Bhettye Rhubble', 27),\n+        ]\n+        TABLE_NAME = 'test_table'\n+\n+        dataset = Config.CLIENT.dataset(DATASET_NAME)\n+\n+        retry_403(dataset.create)()\n+        self.to_delete.append(dataset)\n+\n+        full_name = bigquery.SchemaField('full_name', 'STRING',\n+                                         mode='REQUIRED')\n+        age = bigquery.SchemaField('age', 'INTEGER', mode='REQUIRED')\n+        table = dataset.table(TABLE_NAME, schema=[full_name, age])\n+        table.create()\n+        self.to_delete.insert(0, table)\n+\n+        with tempfile.NamedTemporaryFile(mode='w+') as csv_file:\n+            writer = csv.writer(csv_file)\n+            writer.writerow(('Full Name', 'Age'))\n+            writer.writerows(ROWS)\n+            csv_file.flush()\n+\n+            with open(csv_file.name, 'rb') as csv_read:","path":"system_tests/bigquery.py","position":37,"original_position":37,"commit_id":"64ff0b923afd836f7f0ff5251315d13ca57c3c38","original_commit_id":"64ff0b923afd836f7f0ff5251315d13ca57c3c38","user":{"login":"dhermes","id":520669,"avatar_url":"https://avatars.githubusercontent.com/u/520669?v=3","gravatar_id":"","url":"https://api.github.com/users/dhermes","html_url":"https://github.com/dhermes","followers_url":"https://api.github.com/users/dhermes/followers","following_url":"https://api.github.com/users/dhermes/following{/other_user}","gists_url":"https://api.github.com/users/dhermes/gists{/gist_id}","starred_url":"https://api.github.com/users/dhermes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhermes/subscriptions","organizations_url":"https://api.github.com/users/dhermes/orgs","repos_url":"https://api.github.com/users/dhermes/repos","events_url":"https://api.github.com/users/dhermes/events{/privacy}","received_events_url":"https://api.github.com/users/dhermes/received_events","type":"User","site_admin":false},"body":"> If we drop that, the file won't exist to be read.\r\n\r\nI realize, just wish there was a better way without having to wrap the entire method in a finally.","created_at":"2016-09-14T17:22:00Z","updated_at":"2016-09-14T17:22:00Z","html_url":"https://github.com/GoogleCloudPlatform/google-cloud-python/pull/2313#discussion_r78793864","pull_request_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/pulls/2313","_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/pulls/comments/78793864"},"html":{"href":"https://github.com/GoogleCloudPlatform/google-cloud-python/pull/2313#discussion_r78793864"},"pull_request":{"href":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/pulls/2313"}}},"pull_request":{"url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/pulls/2313","id":85120895,"html_url":"https://github.com/GoogleCloudPlatform/google-cloud-python/pull/2313","diff_url":"https://github.com/GoogleCloudPlatform/google-cloud-python/pull/2313.diff","patch_url":"https://github.com/GoogleCloudPlatform/google-cloud-python/pull/2313.patch","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/issues/2313","number":2313,"state":"open","locked":false,"title":"Add a system test for 'Table.upload_from_file'.","user":{"login":"tseaver","id":242750,"avatar_url":"https://avatars.githubusercontent.com/u/242750?v=3","gravatar_id":"","url":"https://api.github.com/users/tseaver","html_url":"https://github.com/tseaver","followers_url":"https://api.github.com/users/tseaver/followers","following_url":"https://api.github.com/users/tseaver/following{/other_user}","gists_url":"https://api.github.com/users/tseaver/gists{/gist_id}","starred_url":"https://api.github.com/users/tseaver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tseaver/subscriptions","organizations_url":"https://api.github.com/users/tseaver/orgs","repos_url":"https://api.github.com/users/tseaver/repos","events_url":"https://api.github.com/users/tseaver/events{/privacy}","received_events_url":"https://api.github.com/users/tseaver/received_events","type":"User","site_admin":false},"body":"Closes #2133.\r\n\r\n/cc @jonparrott, @matheuspatury\r\n\r\nI will cancel the PR job on Travis, as this PR changes only system tests.","created_at":"2016-09-13T20:39:08Z","updated_at":"2016-09-14T17:22:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f1927738fa98a464dffe42a44844474a3cd48ff6","assignee":{"login":"daspecster","id":192456,"avatar_url":"https://avatars.githubusercontent.com/u/192456?v=3","gravatar_id":"","url":"https://api.github.com/users/daspecster","html_url":"https://github.com/daspecster","followers_url":"https://api.github.com/users/daspecster/followers","following_url":"https://api.github.com/users/daspecster/following{/other_user}","gists_url":"https://api.github.com/users/daspecster/gists{/gist_id}","starred_url":"https://api.github.com/users/daspecster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daspecster/subscriptions","organizations_url":"https://api.github.com/users/daspecster/orgs","repos_url":"https://api.github.com/users/daspecster/repos","events_url":"https://api.github.com/users/daspecster/events{/privacy}","received_events_url":"https://api.github.com/users/daspecster/received_events","type":"User","site_admin":false},"assignees":[{"login":"daspecster","id":192456,"avatar_url":"https://avatars.githubusercontent.com/u/192456?v=3","gravatar_id":"","url":"https://api.github.com/users/daspecster","html_url":"https://github.com/daspecster","followers_url":"https://api.github.com/users/daspecster/followers","following_url":"https://api.github.com/users/daspecster/following{/other_user}","gists_url":"https://api.github.com/users/daspecster/gists{/gist_id}","starred_url":"https://api.github.com/users/daspecster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daspecster/subscriptions","organizations_url":"https://api.github.com/users/daspecster/orgs","repos_url":"https://api.github.com/users/daspecster/repos","events_url":"https://api.github.com/users/daspecster/events{/privacy}","received_events_url":"https://api.github.com/users/daspecster/received_events","type":"User","site_admin":false},{"login":"dhermes","id":520669,"avatar_url":"https://avatars.githubusercontent.com/u/520669?v=3","gravatar_id":"","url":"https://api.github.com/users/dhermes","html_url":"https://github.com/dhermes","followers_url":"https://api.github.com/users/dhermes/followers","following_url":"https://api.github.com/users/dhermes/following{/other_user}","gists_url":"https://api.github.com/users/dhermes/gists{/gist_id}","starred_url":"https://api.github.com/users/dhermes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhermes/subscriptions","organizations_url":"https://api.github.com/users/dhermes/orgs","repos_url":"https://api.github.com/users/dhermes/repos","events_url":"https://api.github.com/users/dhermes/events{/privacy}","received_events_url":"https://api.github.com/users/dhermes/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/pulls/2313/commits","review_comments_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/pulls/2313/comments","review_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/pulls/comments{/number}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/issues/2313/comments","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/statuses/64ff0b923afd836f7f0ff5251315d13ca57c3c38","head":{"label":"tseaver:2133-bigquery-systest-table-upload_from_file","ref":"2133-bigquery-systest-table-upload_from_file","sha":"64ff0b923afd836f7f0ff5251315d13ca57c3c38","user":{"login":"tseaver","id":242750,"avatar_url":"https://avatars.githubusercontent.com/u/242750?v=3","gravatar_id":"","url":"https://api.github.com/users/tseaver","html_url":"https://github.com/tseaver","followers_url":"https://api.github.com/users/tseaver/followers","following_url":"https://api.github.com/users/tseaver/following{/other_user}","gists_url":"https://api.github.com/users/tseaver/gists{/gist_id}","starred_url":"https://api.github.com/users/tseaver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tseaver/subscriptions","organizations_url":"https://api.github.com/users/tseaver/orgs","repos_url":"https://api.github.com/users/tseaver/repos","events_url":"https://api.github.com/users/tseaver/events{/privacy}","received_events_url":"https://api.github.com/users/tseaver/received_events","type":"User","site_admin":false},"repo":{"id":23322104,"name":"google-cloud-python","full_name":"tseaver/google-cloud-python","owner":{"login":"tseaver","id":242750,"avatar_url":"https://avatars.githubusercontent.com/u/242750?v=3","gravatar_id":"","url":"https://api.github.com/users/tseaver","html_url":"https://github.com/tseaver","followers_url":"https://api.github.com/users/tseaver/followers","following_url":"https://api.github.com/users/tseaver/following{/other_user}","gists_url":"https://api.github.com/users/tseaver/gists{/gist_id}","starred_url":"https://api.github.com/users/tseaver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tseaver/subscriptions","organizations_url":"https://api.github.com/users/tseaver/orgs","repos_url":"https://api.github.com/users/tseaver/repos","events_url":"https://api.github.com/users/tseaver/events{/privacy}","received_events_url":"https://api.github.com/users/tseaver/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tseaver/google-cloud-python","description":"Google Cloud Python Client Library","fork":true,"url":"https://api.github.com/repos/tseaver/google-cloud-python","forks_url":"https://api.github.com/repos/tseaver/google-cloud-python/forks","keys_url":"https://api.github.com/repos/tseaver/google-cloud-python/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tseaver/google-cloud-python/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tseaver/google-cloud-python/teams","hooks_url":"https://api.github.com/repos/tseaver/google-cloud-python/hooks","issue_events_url":"https://api.github.com/repos/tseaver/google-cloud-python/issues/events{/number}","events_url":"https://api.github.com/repos/tseaver/google-cloud-python/events","assignees_url":"https://api.github.com/repos/tseaver/google-cloud-python/assignees{/user}","branches_url":"https://api.github.com/repos/tseaver/google-cloud-python/branches{/branch}","tags_url":"https://api.github.com/repos/tseaver/google-cloud-python/tags","blobs_url":"https://api.github.com/repos/tseaver/google-cloud-python/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tseaver/google-cloud-python/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tseaver/google-cloud-python/git/refs{/sha}","trees_url":"https://api.github.com/repos/tseaver/google-cloud-python/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tseaver/google-cloud-python/statuses/{sha}","languages_url":"https://api.github.com/repos/tseaver/google-cloud-python/languages","stargazers_url":"https://api.github.com/repos/tseaver/google-cloud-python/stargazers","contributors_url":"https://api.github.com/repos/tseaver/google-cloud-python/contributors","subscribers_url":"https://api.github.com/repos/tseaver/google-cloud-python/subscribers","subscription_url":"https://api.github.com/repos/tseaver/google-cloud-python/subscription","commits_url":"https://api.github.com/repos/tseaver/google-cloud-python/commits{/sha}","git_commits_url":"https://api.github.com/repos/tseaver/google-cloud-python/git/commits{/sha}","comments_url":"https://api.github.com/repos/tseaver/google-cloud-python/comments{/number}","issue_comment_url":"https://api.github.com/repos/tseaver/google-cloud-python/issues/comments{/number}","contents_url":"https://api.github.com/repos/tseaver/google-cloud-python/contents/{+path}","compare_url":"https://api.github.com/repos/tseaver/google-cloud-python/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tseaver/google-cloud-python/merges","archive_url":"https://api.github.com/repos/tseaver/google-cloud-python/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tseaver/google-cloud-python/downloads","issues_url":"https://api.github.com/repos/tseaver/google-cloud-python/issues{/number}","pulls_url":"https://api.github.com/repos/tseaver/google-cloud-python/pulls{/number}","milestones_url":"https://api.github.com/repos/tseaver/google-cloud-python/milestones{/number}","notifications_url":"https://api.github.com/repos/tseaver/google-cloud-python/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tseaver/google-cloud-python/labels{/name}","releases_url":"https://api.github.com/repos/tseaver/google-cloud-python/releases{/id}","deployments_url":"https://api.github.com/repos/tseaver/google-cloud-python/deployments","created_at":"2014-08-25T17:19:33Z","updated_at":"2016-09-07T17:35:47Z","pushed_at":"2016-09-13T20:35:23Z","git_url":"git://github.com/tseaver/google-cloud-python.git","ssh_url":"git@github.com:tseaver/google-cloud-python.git","clone_url":"https://github.com/tseaver/google-cloud-python.git","svn_url":"https://github.com/tseaver/google-cloud-python","homepage":"http://googlecloudplatform.github.io/gcloud-python/","size":11682,"stargazers_count":1,"watchers_count":1,"language":"Python","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":1,"default_branch":"master"}},"base":{"label":"GoogleCloudPlatform:master","ref":"master","sha":"3ab8459ea424ea1277da0c07b5e59681c152d570","user":{"login":"GoogleCloudPlatform","id":2810941,"avatar_url":"https://avatars.githubusercontent.com/u/2810941?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"repo":{"id":16316451,"name":"google-cloud-python","full_name":"GoogleCloudPlatform/google-cloud-python","owner":{"login":"GoogleCloudPlatform","id":2810941,"avatar_url":"https://avatars.githubusercontent.com/u/2810941?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/GoogleCloudPlatform/google-cloud-python","description":"Google Cloud Client Library for Python","fork":false,"url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python","forks_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/forks","keys_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/teams","hooks_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/hooks","issue_events_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/issues/events{/number}","events_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/events","assignees_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/assignees{/user}","branches_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/branches{/branch}","tags_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/tags","blobs_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/git/refs{/sha}","trees_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/statuses/{sha}","languages_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/languages","stargazers_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/stargazers","contributors_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/contributors","subscribers_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/subscribers","subscription_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/subscription","commits_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/commits{/sha}","git_commits_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/git/commits{/sha}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/comments{/number}","issue_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/issues/comments{/number}","contents_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/contents/{+path}","compare_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/merges","archive_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/downloads","issues_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/issues{/number}","pulls_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/pulls{/number}","milestones_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/milestones{/number}","notifications_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/labels{/name}","releases_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/releases{/id}","deployments_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/deployments","created_at":"2014-01-28T15:51:47Z","updated_at":"2016-09-13T21:58:05Z","pushed_at":"2016-09-14T16:11:48Z","git_url":"git://github.com/GoogleCloudPlatform/google-cloud-python.git","ssh_url":"git@github.com:GoogleCloudPlatform/google-cloud-python.git","clone_url":"https://github.com/GoogleCloudPlatform/google-cloud-python.git","svn_url":"https://github.com/GoogleCloudPlatform/google-cloud-python","homepage":"https://googlecloudplatform.github.io/google-cloud-python/","size":78373,"stargazers_count":395,"watchers_count":395,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":201,"mirror_url":null,"open_issues_count":203,"forks":201,"open_issues":203,"watchers":395,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/pulls/2313"},"html":{"href":"https://github.com/GoogleCloudPlatform/google-cloud-python/pull/2313"},"issue":{"href":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/issues/2313"},"comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/issues/2313/comments"},"review_comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/pulls/2313/comments"},"review_comment":{"href":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/pulls/2313/commits"},"statuses":{"href":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/statuses/64ff0b923afd836f7f0ff5251315d13ca57c3c38"}}}}
{"actor":{"display_login":"dhermes"}}