tylertreat/BigQuery-Python — pull request #17 by aneilbaboo (2014-08-26 07:39:02+00:00)
Title: Enable data import from Google Cloud Storage files

Added two client methods which enable importing data from Google Cloud Storage files, and waiting until the job is complete:

* client.import_data_from_uris
* client.wait_for_job

These methods have been tested against live Google Cloud Storage and BigQuery instances, and are currently being used in production.

```python
schema = [ {"name": "username", "type": "string", "mode": "nullable"} ]
job = client.import_data_from_uris( ['gs://mybucket/mydata.json'],
'dataset',
'table',
schema,
source_format=JOB_SOURCE_FORMAT_JSON)

job = client.wait_for_job(job, timeout=60)
print(job)
```