Skip to content

view.query property not exposed by Bigquery API #3754

@nicku33

Description

@nicku33
OS X 10
Python 2.7.10
Name: google-cloud Version: 0.24.0

To reproduce, make a view. In our case it was existing.
! bq show --format=json nytdata:audit_et.audit_ab_alloc_view

Note that the property view.query is present in the json:

{"kind":"bigquery#table","creationTime":"1471555852846",
...
"view":{"query":"with date_range a ... REDACTED ...",
"useLegacySql":false},"type":"VIEW","id":"nytdata:audit_et.audit_ab_alloc_view","selfLink":"https://www.googleapis.com/bigquery/v2/projects/nytdata/datasets/audit_et/tables/audit_ab_alloc_view","
...
}

But if I try to get it from the API, nothing:

from google.cloud import bigquery

project="nytdata"
dataset="audit_et"
table="audit_ab_alloc_view"

bigquery_client = bigquery.Client(project=project)
dataset_temp = bigquery_client.dataset(dataset)
t=dataset_temp.table(table)
t=dataset_temp.table(u'audit_ab_alloc_view')

t.exists()
>> True

t.view_query == None
>> True

Metadata

Metadata

Assignees

Labels

api: bigqueryIssues related to the BigQuery API.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions