{"action":"created","issue":{"url":"https://api.github.com/repos/google/google-api-python-client/issues/281","repository_url":"https://api.github.com/repos/google/google-api-python-client","labels_url":"https://api.github.com/repos/google/google-api-python-client/issues/281/labels{/name}","comments_url":"https://api.github.com/repos/google/google-api-python-client/issues/281/comments","events_url":"https://api.github.com/repos/google/google-api-python-client/issues/281/events","html_url":"https://github.com/google/google-api-python-client/issues/281","id":178540236,"number":281,"title":"please decode data type to corresponding python data type","user":{"login":"c0b","id":14798161,"avatar_url":"https://avatars3.githubusercontent.com/u/14798161?v=4","gravatar_id":"","url":"https://api.github.com/users/c0b","html_url":"https://github.com/c0b","followers_url":"https://api.github.com/users/c0b/followers","following_url":"https://api.github.com/users/c0b/following{/other_user}","gists_url":"https://api.github.com/users/c0b/gists{/gist_id}","starred_url":"https://api.github.com/users/c0b/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/c0b/subscriptions","organizations_url":"https://api.github.com/users/c0b/orgs","repos_url":"https://api.github.com/users/c0b/repos","events_url":"https://api.github.com/users/c0b/events{/privacy}","received_events_url":"https://api.github.com/users/c0b/received_events","type":"User","site_admin":false},"labels":[{"id":567787918,"url":"https://api.github.com/repos/google/google-api-python-client/labels/status:%20enhancement","name":"status: enhancement","color":"c2e0c6","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-09-22T07:24:15Z","updated_at":"2018-04-25T17:28:59Z","closed_at":null,"author_association":"NONE","body":"the bq tool is an app from google cloud SDK, which is using this library\n\n``` console\n$ bq --apilog - query --use_legacy_sql=false 'SELECT 1 AS a'\n\nINFO:root:user-agent: google-api-python-client/1.3.1 (gzip)\n\nINFO:root:{\n \"kind\": \"bigquery#getQueryResultsResponse\",\n \"etag\": \"\\\"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\\\"\",\n \"schema\": {\n  \"fields\": [\n   {\n    \"name\": \"a\",\n    \"type\": \"INTEGER\",\n    \"mode\": \"NULLABLE\"\n   }\n  ]\n },\n \"jobReference\": {\n  \"projectId\": \"XXXXXXXXX\",\n  \"jobId\": \"bqjob_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\"\n },\n \"totalRows\": \"1\",\n \"rows\": [\n  {\n   \"f\": [\n    {\n     \"v\": \"1\"\n    }\n   ]\n  }\n ],\n \"totalBytesProcessed\": \"0\",\n \"jobComplete\": true,\n \"cacheHit\": true\n}\n\nINFO:root:--response-end--\n[\n  {\n    \"a\": \"1\"\n  }\n]\n\n#### similar query for `SELECT 1 AS a, 2.3 AS b`\n\n \"schema\": {\n  \"fields\": [\n   {\n    \"name\": \"a\",\n    \"type\": \"INTEGER\",\n    \"mode\": \"NULLABLE\"\n   },\n   {\n    \"name\": \"b\",\n    \"type\": \"FLOAT\",\n    \"mode\": \"NULLABLE\"\n   }\n  ]\n },\n\n \"totalRows\": \"1\",\n \"rows\": [\n  {\n   \"f\": [\n    {\n     \"v\": \"1\"\n    },\n    {\n     \"v\": \"2.3\"\n    }\n   ]\n  }\n ],\n\n \"totalBytesProcessed\": \"0\",\n \"jobComplete\": true,\n \"cacheHit\": false\n}\n\nINFO:root:--response-end--\n[\n  {\n    \"a\": \"1\", \n    \"b\": \"2.3\"\n  }\n]\n\n```\n\nwith schema from the api output, you can do more to decode each value into its correct data type: from `\"1\"` to INTEGER `1`:\n\nexpected output\n\n``` python\n  {\n    \"a\": 1, \n    \"b\": 2.3\n  }\n\n```\n"},"comment":{"url":"https://api.github.com/repos/google/google-api-python-client/issues/comments/384368757","html_url":"https://github.com/google/google-api-python-client/issues/281#issuecomment-384368757","issue_url":"https://api.github.com/repos/google/google-api-python-client/issues/281","id":384368757,"user":{"login":"mattwhisenhunt","id":5246939,"avatar_url":"https://avatars3.githubusercontent.com/u/5246939?v=4","gravatar_id":"","url":"https://api.github.com/users/mattwhisenhunt","html_url":"https://github.com/mattwhisenhunt","followers_url":"https://api.github.com/users/mattwhisenhunt/followers","following_url":"https://api.github.com/users/mattwhisenhunt/following{/other_user}","gists_url":"https://api.github.com/users/mattwhisenhunt/gists{/gist_id}","starred_url":"https://api.github.com/users/mattwhisenhunt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattwhisenhunt/subscriptions","organizations_url":"https://api.github.com/users/mattwhisenhunt/orgs","repos_url":"https://api.github.com/users/mattwhisenhunt/repos","events_url":"https://api.github.com/users/mattwhisenhunt/events{/privacy}","received_events_url":"https://api.github.com/users/mattwhisenhunt/received_events","type":"User","site_admin":false},"created_at":"2018-04-25T17:28:59Z","updated_at":"2018-04-25T17:28:59Z","author_association":"COLLABORATOR","body":"@c0b it is being maintained, now more-so than in the past. We have limited resources dedicated to it so feature requests such as this one are low priority at the moment."}}
{"actor":{"display_login":"mattwhisenhunt"}}