{"action":"created","issue":{"url":"https://api.github.com/repos/spotify/scio/issues/346","repository_url":"https://api.github.com/repos/spotify/scio","labels_url":"https://api.github.com/repos/spotify/scio/issues/346/labels{/name}","comments_url":"https://api.github.com/repos/spotify/scio/issues/346/comments","events_url":"https://api.github.com/repos/spotify/scio/issues/346/events","html_url":"https://github.com/spotify/scio/issues/346","id":192966880,"number":346,"title":"writeToBigQuery swallows return status?","user":{"login":"jonopwell","id":8239940,"avatar_url":"https://avatars.githubusercontent.com/u/8239940?v=3","gravatar_id":"","url":"https://api.github.com/users/jonopwell","html_url":"https://github.com/jonopwell","followers_url":"https://api.github.com/users/jonopwell/followers","following_url":"https://api.github.com/users/jonopwell/following{/other_user}","gists_url":"https://api.github.com/users/jonopwell/gists{/gist_id}","starred_url":"https://api.github.com/users/jonopwell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonopwell/subscriptions","organizations_url":"https://api.github.com/users/jonopwell/orgs","repos_url":"https://api.github.com/users/jonopwell/repos","events_url":"https://api.github.com/users/jonopwell/events{/privacy}","received_events_url":"https://api.github.com/users/jonopwell/received_events","type":"User","site_admin":false},"labels":[{"id":192446856,"url":"https://api.github.com/repos/spotify/scio/labels/question","name":"question","color":"cc317c","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2016-12-01T21:27:10Z","updated_at":"2016-12-08T21:25:02Z","closed_at":null,"body":"We want the ability to detect errors if appending to a BigQuery table, and it appears that the method\r\n\r\n```\r\nsaveAsBigQuery(table: TableReference, schema: TableSchema,\r\n                     writeDisposition: WriteDisposition,\r\n                     createDisposition: CreateDisposition)\r\n                    (implicit ev: T <:< TableRow): Future[Tap[TableRow]]\r\n\r\n```\r\nin com.spotify.scio.values.SCollection.scala unconditionally returns an error future if not testing and we are appending to the table.\r\n\r\nJava code seems to allow this functionality, per:\r\n\r\n```\r\nInsertAllResponse response = bigquery.insertAll(InsertAllRequest.newBuilder(tableId)\r\n    .addRow(\"rowId\", rowContent)\r\n    // More rows can be added in the same RPC by invoking .addRow() on the builder\r\n    .build());\r\nif (response.hasErrors()) {\r\n  // If any of the insertions failed, this lets you inspect the errors\r\n  for (Entry<Long, List<BigQueryError>> entry : response.getInsertErrors().entrySet()) {\r\n    // inspect row error\r\n  }\r\n}\r\n\r\n```\r\nWould this be reasonable to add?"},"comment":{"url":"https://api.github.com/repos/spotify/scio/issues/comments/265859946","html_url":"https://github.com/spotify/scio/issues/346#issuecomment-265859946","issue_url":"https://api.github.com/repos/spotify/scio/issues/346","id":265859946,"user":{"login":"nevillelyh","id":468514,"avatar_url":"https://avatars.githubusercontent.com/u/468514?v=3","gravatar_id":"","url":"https://api.github.com/users/nevillelyh","html_url":"https://github.com/nevillelyh","followers_url":"https://api.github.com/users/nevillelyh/followers","following_url":"https://api.github.com/users/nevillelyh/following{/other_user}","gists_url":"https://api.github.com/users/nevillelyh/gists{/gist_id}","starred_url":"https://api.github.com/users/nevillelyh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nevillelyh/subscriptions","organizations_url":"https://api.github.com/users/nevillelyh/orgs","repos_url":"https://api.github.com/users/nevillelyh/repos","events_url":"https://api.github.com/users/nevillelyh/events{/privacy}","received_events_url":"https://api.github.com/users/nevillelyh/received_events","type":"User","site_admin":false},"created_at":"2016-12-08T21:25:02Z","updated_at":"2016-12-08T21:25:02Z","body":"Don't think we can solve this without a lot of hacking around the API. Can we close this?"}}
{"actor":{"display_login":"nevillelyh"}}