|
28 | 28 | importtime |
29 | 29 | importuuid |
30 | 30 |
|
31 | | -fromgcloudimportbigquery |
32 | | -importgcloud.bigquery.job |
| 31 | +fromgoogle.cloudimportbigquery |
| 32 | +importgoogle.cloud.bigquery.job |
33 | 33 |
|
34 | 34 |
|
35 | 35 | deflist_projects(): |
@@ -145,7 +145,7 @@ def list_rows(dataset_name, table_name, project=None): |
145 | 145 | break |
146 | 146 |
|
147 | 147 | # Use format to create a simple table. |
148 | | -format_string='{:<16} '*len(table.schema) |
| 148 | +format_string='{!s:<16} '*len(table.schema) |
149 | 149 |
|
150 | 150 | # Print schema field names |
151 | 151 | field_names= [field.nameforfieldintable.schema] |
@@ -177,7 +177,7 @@ def copy_table(dataset_name, table_name, new_table_name, project=None): |
177 | 177 |
|
178 | 178 | # Create the table if it doesn't exist. |
179 | 179 | job.create_disposition= ( |
180 | | -gcloud.bigquery.job.CreateDisposition.CREATE_IF_NEEDED) |
| 180 | +google.cloud.bigquery.job.CreateDisposition.CREATE_IF_NEEDED) |
181 | 181 |
|
182 | 182 | # Start the job. |
183 | 183 | job.begin() |
|