{"action":"created","issue":{"url":"https://api.github.com/repos/rstats-db/bigrquery/issues/41","repository_url":"https://api.github.com/repos/rstats-db/bigrquery","labels_url":"https://api.github.com/repos/rstats-db/bigrquery/issues/41/labels{/name}","comments_url":"https://api.github.com/repos/rstats-db/bigrquery/issues/41/comments","events_url":"https://api.github.com/repos/rstats-db/bigrquery/issues/41/events","html_url":"https://github.com/rstats-db/bigrquery/issues/41","id":51832569,"number":41,"title":"dplyr backend for BigQuery: Get resulting schema for a query before executing it","user":{"login":"deflaux","id":1395500,"avatar_url":"https://avatars.githubusercontent.com/u/1395500?v=3","gravatar_id":"","url":"https://api.github.com/users/deflaux","html_url":"https://github.com/deflaux","followers_url":"https://api.github.com/users/deflaux/followers","following_url":"https://api.github.com/users/deflaux/following{/other_user}","gists_url":"https://api.github.com/users/deflaux/gists{/gist_id}","starred_url":"https://api.github.com/users/deflaux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deflaux/subscriptions","organizations_url":"https://api.github.com/users/deflaux/orgs","repos_url":"https://api.github.com/users/deflaux/repos","events_url":"https://api.github.com/users/deflaux/events{/privacy}","received_events_url":"https://api.github.com/users/deflaux/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2014-12-12T17:40:24Z","updated_at":"2016-02-24T17:51:45Z","closed_at":null,"body":"Per @hadley, he was looking for a way to get the result schema for a particular query *prior* to executing it.\r\n\r\nUnfortunately the BigQuery API does not support this today.  Per advice from @fhoffa:\r\n\r\n 1. Filing a [feature request](https://code.google.com/p/google-bigquery/issues/entry?template=Feature%20Request) to the BigQuery team to support this cleanly would be most appreciated.\r\n 1. In the meantime, [table decorators](https://cloud.google.com/bigquery/table-decorators) can be used to *effectively* run a query on zero bytes of data.  By adding @-1- to the end of the table name, it will access everything that has been loaded in the last millisecond.  *Note that if any data was actually loaded within the prior millisecond the result would operate over more than zero bytes, but this should do the trick the vast majority of the time.*"},"comment":{"url":"https://api.github.com/repos/rstats-db/bigrquery/issues/comments/188379177","html_url":"https://github.com/rstats-db/bigrquery/issues/41#issuecomment-188379177","issue_url":"https://api.github.com/repos/rstats-db/bigrquery/issues/41","id":188379177,"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},"created_at":"2016-02-24T17:51:45Z","updated_at":"2016-02-24T17:51:45Z","body":"I have found that the decorator `@-1--1` also works. However, I also suspect that it returns the data timestamped at \"now - 1 ms\": a test using `@mod-mod` where mod is the modification time of the table returned nonzero rows."}}