Skip to content

Commit fc6b7aa

Browse files
alixhamibshaffer
authored andcommitted
Deletes unused BigQuery region tags an standardizes remaining ones (GoogleCloudPlatform#602)
1 parent e9d4e92 commit fc6b7aa

16 files changed

+28
-44
lines changed

bigquery/api/src/functions/bigquery_client.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@
2525
* $bigQuery = require '/path/to/bigquery_client.php';
2626
* ```
2727
*/
28-
# [START build_service]
28+
# [START bigquery_client_default_credentials]
2929
use Google\Cloud\BigQuery\BigQueryClient;
3030

3131
$bigQuery = new BigQueryClient([
3232
'projectId' => $projectId,
3333
]);
34-
# [END build_service]
34+
# [END bigquery_client_default_credentials]
3535
return $bigQuery;

bigquery/api/src/functions/browse_table.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
namespace Google\Cloud\Samples\BigQuery;
2525

26-
# [START browse_table]
26+
# [START bigquery_browse_table]
2727
use Google\Cloud\BigQuery\BigQueryClient;
2828

2929
/**
@@ -63,9 +63,8 @@ function browse_table($projectId, $datasetId, $tableId, $maxResults = 10, $start
6363

6464
return $numRows;
6565
}
66-
# [END browse_table]
66+
# [END bigquery_browse_table]
6767

68-
# [START paginate_table]
6968
/**
7069
* Paginate through a bigquery table.
7170
* Example:
@@ -97,4 +96,3 @@ function paginate_table($projectId, $datasetId, $tableId, $maxResults = 10, $sho
9796

9897
return $totalRows;
9998
}
100-
# [END paginate_table]

bigquery/api/src/functions/copy_table.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
namespace Google\Cloud\Samples\BigQuery;
2525

2626
use Exception;
27-
# [START copy_table]
27+
# [START bigquery_copy_table]
2828
use Google\Cloud\BigQuery\BigQueryClient;
2929
use Google\Cloud\Core\ExponentialBackoff;
3030

@@ -62,4 +62,4 @@ function copy_table($projectId, $datasetId, $sourceTableId, $destinationTableId)
6262
print('Table copied successfully' . PHP_EOL);
6363
}
6464
}
65-
# [END copy_table]
65+
# [END bigquery_copy_table]

bigquery/api/src/functions/create_dataset.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
namespace Google\Cloud\Samples\BigQuery;
2525

26-
# [START create_dataset]
26+
# [START bigquery_create_dataset]
2727
use Google\Cloud\BigQuery\BigQueryClient;
2828

2929
/**
@@ -38,4 +38,4 @@ function create_dataset($projectId, $datasetId)
3838
$dataset = $bigQuery->createDataset($datasetId);
3939
return $dataset;
4040
}
41-
# [END create_dataset]
41+
# [END bigquery_create_dataset]

bigquery/api/src/functions/create_table.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
namespace Google\Cloud\Samples\BigQuery;
2525

26-
# [START create_table]
26+
# [START bigquery_create_table]
2727
use Google\Cloud\BigQuery\BigQueryClient;
2828

2929
/**
@@ -58,4 +58,4 @@ function create_table($projectId, $datasetId, $tableId, $schema)
5858
$table = $dataset->createTable($tableId, $options);
5959
return $table;
6060
}
61-
# [END create_table]
61+
# [END bigquery_create_table]

bigquery/api/src/functions/delete_table.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
namespace Google\Cloud\Samples\BigQuery;
2525

26-
# [START delete_table]
26+
# [START bigquery_delete_table]
2727
use Google\Cloud\BigQuery\BigQueryClient;
2828

2929
/**
@@ -36,10 +36,8 @@ function delete_table($projectId, $datasetId, $tableId)
3636
$bigQuery = new BigQueryClient([
3737
'projectId' => $projectId,
3838
]);
39-
# [START get_table]
4039
$dataset = $bigQuery->dataset($datasetId);
4140
$table = $dataset->table($tableId);
42-
# [END get_table]
4341
$table->delete();
4442
}
45-
# [END delete_table]
43+
# [END bigquery_delete_table]

bigquery/api/src/functions/extract_table.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
namespace Google\Cloud\Samples\BigQuery;
2525

2626
use Exception;
27-
# [START extract_table]
27+
# [START bigquery_extract_table]
2828
use Google\Cloud\BigQuery\BigQueryClient;
2929
use Google\Cloud\Storage\StorageClient;
3030
use Google\Cloud\Core\ExponentialBackoff;
@@ -70,4 +70,4 @@ function extract_table($projectId, $datasetId, $tableId, $bucketName, $objectNam
7070
print('Data extracted successfully' . PHP_EOL);
7171
}
7272
}
73-
# [END extract_table]
73+
# [END bigquery_extract_table]

bigquery/api/src/functions/import_from_file.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
use Exception;
2727
use InvalidArgumentException;
28-
# [START import_from_file]
28+
# [START bigquery_load_from_file]
2929
use Google\Cloud\BigQuery\BigQueryClient;
3030
use Google\Cloud\Core\ExponentialBackoff;
3131

@@ -72,4 +72,4 @@ function import_from_file($projectId, $datasetId, $tableId, $source)
7272
print('Data imported successfully' . PHP_EOL);
7373
}
7474
}
75-
# [END import_from_file]
75+
# [END bigquery_load_from_file]

bigquery/api/src/functions/import_from_storage.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
namespace Google\Cloud\Samples\BigQuery;
2525

2626
use Exception;
27-
# [START import_from_storage]
27+
# [START bigquery_load_table_gcs_csv]
2828
use Google\Cloud\BigQuery\BigQueryClient;
2929
use Google\Cloud\Storage\StorageClient;
3030
use Google\Cloud\Core\ExponentialBackoff;
@@ -75,4 +75,4 @@ function import_from_storage($projectId, $datasetId, $tableId, $bucketName, $obj
7575
print('Data imported successfully' . PHP_EOL);
7676
}
7777
}
78-
# [END import_from_storage]
78+
# [END bigquery_load_table_gcs_csv]

bigquery/api/src/functions/insert_sql.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323

2424
namespace Google\Cloud\Samples\BigQuery;
2525

26-
# [START insert_sql]
2726
use Google\Cloud\BigQuery\BigQueryClient;
2827

2928
/**
@@ -49,4 +48,3 @@ function insert_sql($projectId, $datasetId, $source)
4948
}
5049
print('Data imported successfully' . PHP_EOL);
5150
}
52-
# [END insert_sql]

0 commit comments

Comments
 (0)