Skip to content

Commit 34773ce

Browse files
Jon Wayne Parrottshollyman
Jon Wayne Parrott
authored andcommitted
1 parent 8d8fc34 commit 34773ce

9 files changed

+12
-12
lines changed

samples/snippets/async_query.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
import time
2828
import uuid
2929

30-
from gcloud import bigquery
30+
from google.cloud import bigquery
3131

3232

3333
def async_query(query):

samples/snippets/export_data_to_gcs.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
import time
3030
import uuid
3131

32-
from gcloud import bigquery
32+
from google.cloud import bigquery
3333

3434

3535
def export_data_to_gcs(dataset_name, table_name, destination):

samples/snippets/load_data_from_file.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
import argparse
2929
import time
30-
from gcloud import bigquery
30+
from google.cloud import bigquery
3131

3232

3333
def load_data_from_file(dataset_name, table_name, source_file_name):

samples/snippets/load_data_from_gcs.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
import time
3030
import uuid
3131

32-
from gcloud import bigquery
32+
from google.cloud import bigquery
3333

3434

3535
def load_data_from_gcs(dataset_name, table_name, source):

samples/snippets/requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
gcloud==0.18.3
1+
google-cloud-bigquery==0.20.0

samples/snippets/snippets.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828
import time
2929
import uuid
3030

31-
from gcloud import bigquery
32-
import gcloud.bigquery.job
31+
from google.cloud import bigquery
32+
import google.cloud.bigquery.job
3333

3434

3535
def list_projects():
@@ -145,7 +145,7 @@ def list_rows(dataset_name, table_name, project=None):
145145
break
146146

147147
# Use format to create a simple table.
148-
format_string = '{:<16} ' * len(table.schema)
148+
format_string = '{!s:<16} ' * len(table.schema)
149149

150150
# Print schema field names
151151
field_names = [field.name for field in table.schema]
@@ -177,7 +177,7 @@ def copy_table(dataset_name, table_name, new_table_name, project=None):
177177

178178
# Create the table if it doesn't exist.
179179
job.create_disposition = (
180-
gcloud.bigquery.job.CreateDisposition.CREATE_IF_NEEDED)
180+
google.cloud.bigquery.job.CreateDisposition.CREATE_IF_NEEDED)
181181

182182
# Start the job.
183183
job.begin()

samples/snippets/snippets_test.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
from gcloud import bigquery
15+
from google.cloud import bigquery
1616
import pytest
1717

1818
import snippets

samples/snippets/stream_data.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
import json
3030
from pprint import pprint
3131

32-
from gcloud import bigquery
32+
from google.cloud import bigquery
3333

3434

3535
def stream_data(dataset_name, table_name, json_data):

samples/snippets/sync_query.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
import argparse
2727

2828
# [START sync_query]
29-
from gcloud import bigquery
29+
from google.cloud import bigquery
3030

3131

3232
def sync_query(query):

0 commit comments

Comments
 (0)