This is an automated email from the ASF dual-hosted git repository. yhu pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/beam.git
The following commit(s) were added to refs/heads/master by this push: new 44aea4bdeca Use apache-beam-testing.samples (#28064) 44aea4bdeca is described below commit 44aea4bdecabdeb59b6ac0452f17d28b62341cc1 Author: liferoad <huxiangq...@gmail.com> AuthorDate: Sat Aug 19 20:03:59 2023 -0400 Use apache-beam-testing.samples (#28064) * Use apache-beam-testing.samples * run ./gradlew :examples:java:spotlessApply --- .../apache/beam/examples/cookbook/BigQueryTornadoes.java | 6 +++--- .../org/apache/beam/examples/cookbook/FilterExamples.java | 6 +++--- .../org/apache/beam/examples/cookbook/JoinExamples.java | 2 +- .../apache/beam/examples/cookbook/MaxPerKeyExamples.java | 6 +++--- .../beam/examples/cookbook/MinimalBigQueryTornadoes.java | 4 ++-- .../java/org/apache/beam/examples/snippets/Snippets.java | 14 +++++++------- .../beam/examples/kotlin/cookbook/BigQueryTornadoes.kt | 4 ++-- .../apache/beam/examples/kotlin/cookbook/FilterExamples.kt | 4 ++-- .../apache/beam/examples/kotlin/cookbook/JoinExamples.kt | 2 +- .../beam/examples/kotlin/cookbook/MaxPerKeyExamples.kt | 4 ++-- .../org/apache/beam/examples/kotlin/snippets/Snippets.kt | 14 +++++++------- .../io/big-query-io/read-table/description.md | 2 +- .../io/big-query-io/read-table/java-example/Task.java | 2 +- .../learning-content/io/rest-api/description.md | 2 +- playground/backend/internal/fs_tool/ExampleData.scala | 4 ++-- sdks/go/examples/cookbook/filter/filter.go | 2 +- sdks/go/examples/cookbook/join/join.go | 2 +- sdks/go/examples/cookbook/max/max.go | 2 +- sdks/go/examples/cookbook/tornadoes/tornadoes.go | 4 ++-- .../src/main/java/org/apache/beam/sdk/io/package-info.java | 2 +- .../org/apache/beam/sdk/io/gcp/bigquery/BigQueryIO.java | 4 ++-- .../beam/sdk/io/gcp/bigquery/BigQueryClusteringIT.java | 2 +- .../gcp/bigquery/BigQueryTimePartitioningClusteringIT.java | 2 +- .../apache_beam/examples/cookbook/bigquery_tornadoes.py | 2 +- sdks/python/apache_beam/examples/cookbook/filters.py | 2 +- sdks/python/apache_beam/examples/snippets/snippets.py | 6 +++--- 26 files changed, 53 insertions(+), 53 deletions(-) diff --git a/examples/java/src/main/java/org/apache/beam/examples/cookbook/BigQueryTornadoes.java b/examples/java/src/main/java/org/apache/beam/examples/cookbook/BigQueryTornadoes.java index 279626e19c0..b7ef94338d7 100644 --- a/examples/java/src/main/java/org/apache/beam/examples/cookbook/BigQueryTornadoes.java +++ b/examples/java/src/main/java/org/apache/beam/examples/cookbook/BigQueryTornadoes.java @@ -63,15 +63,15 @@ import org.slf4j.LoggerFactory; * * See examples/java/README.md for instructions about how to configure different runners. * - * <p>The BigQuery input table defaults to {@code clouddataflow-readonly:samples.weather_stations} - * and can be overridden with {@code --input}. + * <p>The BigQuery input table defaults to {@code apache-beam-testing.samples.weather_stations} and + * can be overridden with {@code --input}. */ public class BigQueryTornadoes { private static final Logger LOG = LoggerFactory.getLogger(BigQueryTornadoes.class); // Default to using a 1000 row subset of the public weather station table publicdata:samples.gsod. private static final String WEATHER_SAMPLES_TABLE = - "clouddataflow-readonly:samples.weather_stations"; + "apache-beam-testing.samples.weather_stations"; /** * Examines each row in the input table. If a tornado was recorded in that sample, the month in diff --git a/examples/java/src/main/java/org/apache/beam/examples/cookbook/FilterExamples.java b/examples/java/src/main/java/org/apache/beam/examples/cookbook/FilterExamples.java index 1baefbcda10..9187bb83d7d 100644 --- a/examples/java/src/main/java/org/apache/beam/examples/cookbook/FilterExamples.java +++ b/examples/java/src/main/java/org/apache/beam/examples/cookbook/FilterExamples.java @@ -71,13 +71,13 @@ import org.apache.beam.sdk.values.PCollectionView; * * See examples/java/README.md for instructions about how to configure different runners. * - * <p>The BigQuery input table defaults to {@code clouddataflow-readonly:samples.weather_stations} - * and can be overridden with {@code --input}. + * <p>The BigQuery input table defaults to {@code apache-beam-testing.samples.weather_stations} and + * can be overridden with {@code --input}. */ public class FilterExamples { // Default to using a 1000 row subset of the public weather station table publicdata:samples.gsod. private static final String WEATHER_SAMPLES_TABLE = - "clouddataflow-readonly:samples.weather_stations"; + "apache-beam-testing.samples.weather_stations"; static final Logger LOG = Logger.getLogger(FilterExamples.class.getName()); static final int MONTH_TO_FILTER = 7; diff --git a/examples/java/src/main/java/org/apache/beam/examples/cookbook/JoinExamples.java b/examples/java/src/main/java/org/apache/beam/examples/cookbook/JoinExamples.java index 66980f4ce9f..f78df0c0946 100644 --- a/examples/java/src/main/java/org/apache/beam/examples/cookbook/JoinExamples.java +++ b/examples/java/src/main/java/org/apache/beam/examples/cookbook/JoinExamples.java @@ -58,7 +58,7 @@ import org.apache.beam.sdk.values.TupleTag; public class JoinExamples { // A 1000-row sample of the GDELT data here: gdelt-bq:full.events. - private static final String GDELT_EVENTS_TABLE = "clouddataflow-readonly:samples.gdelt_sample"; + private static final String GDELT_EVENTS_TABLE = "apache-beam-testing.samples.gdelt_sample"; // A table that maps country codes to country names. private static final String COUNTRY_CODES = "gdelt-bq:full.crosswalk_geocountrycodetohuman"; diff --git a/examples/java/src/main/java/org/apache/beam/examples/cookbook/MaxPerKeyExamples.java b/examples/java/src/main/java/org/apache/beam/examples/cookbook/MaxPerKeyExamples.java index dec3b70a666..8760d562d04 100644 --- a/examples/java/src/main/java/org/apache/beam/examples/cookbook/MaxPerKeyExamples.java +++ b/examples/java/src/main/java/org/apache/beam/examples/cookbook/MaxPerKeyExamples.java @@ -59,13 +59,13 @@ import org.apache.beam.sdk.values.PCollection; * * See examples/java/README.md for instructions about how to configure different runners. * - * <p>The BigQuery input table defaults to {@code clouddataflow-readonly:samples.weather_stations } - * and can be overridden with {@code --input}. + * <p>The BigQuery input table defaults to {@code apache-beam-testing.samples.weather_stations } and + * can be overridden with {@code --input}. */ public class MaxPerKeyExamples { // Default to using a 1000 row subset of the public weather station table publicdata:samples.gsod. private static final String WEATHER_SAMPLES_TABLE = - "clouddataflow-readonly:samples.weather_stations"; + "apache-beam-testing.samples.weather_stations"; /** * Examines each row (weather reading) in the input table. Output the month of the reading, and diff --git a/examples/java/src/main/java/org/apache/beam/examples/cookbook/MinimalBigQueryTornadoes.java b/examples/java/src/main/java/org/apache/beam/examples/cookbook/MinimalBigQueryTornadoes.java index 8d57fdfbad5..60b5c02a5f4 100644 --- a/examples/java/src/main/java/org/apache/beam/examples/cookbook/MinimalBigQueryTornadoes.java +++ b/examples/java/src/main/java/org/apache/beam/examples/cookbook/MinimalBigQueryTornadoes.java @@ -58,14 +58,14 @@ import org.slf4j.LoggerFactory; * * <p>Concepts: Reading/writing BigQuery; counting a PCollection; user-defined PTransforms * - * <p>The BigQuery input is taken from {@code clouddataflow-readonly:samples.weather_stations} + * <p>The BigQuery input is taken from {@code apache-beam-testing.samples.weather_stations} */ public class MinimalBigQueryTornadoes { private static final Logger LOG = LoggerFactory.getLogger(MinimalBigQueryTornadoes.class); // Use a 1000 row subset of the public weather station table publicdata:samples.gsod. private static final String WEATHER_SAMPLES_TABLE = - "clouddataflow-readonly:samples.weather_stations"; + "apache-beam-testing.samples.weather_stations"; /** * Examines each row in the input table. If a tornado was recorded in that sample, the month in diff --git a/examples/java/src/main/java/org/apache/beam/examples/snippets/Snippets.java b/examples/java/src/main/java/org/apache/beam/examples/snippets/Snippets.java index 6eb533aaf24..808b55a92fa 100644 --- a/examples/java/src/main/java/org/apache/beam/examples/snippets/Snippets.java +++ b/examples/java/src/main/java/org/apache/beam/examples/snippets/Snippets.java @@ -172,7 +172,7 @@ public class Snippets { Pipeline p, String writeProject, String writeDataset, String writeTable) { { // [START BigQueryTableSpec] - String tableSpec = "clouddataflow-readonly:samples.weather_stations"; + String tableSpec = "apache-beam-testing.samples.weather_stations"; // [END BigQueryTableSpec] } @@ -212,7 +212,7 @@ public class Snippets { } { - String tableSpec = "clouddataflow-readonly:samples.weather_stations"; + String tableSpec = "apache-beam-testing.samples.weather_stations"; // [START BigQueryReadTable] PCollection<Double> maxTemperatures = p.apply(BigQueryIO.readTableRows().from(tableSpec)) @@ -224,7 +224,7 @@ public class Snippets { } { - String tableSpec = "clouddataflow-readonly:samples.weather_stations"; + String tableSpec = "apache-beam-testing.samples.weather_stations"; // [START BigQueryReadFunction] PCollection<Double> maxTemperatures = p.apply( @@ -242,7 +242,7 @@ public class Snippets { BigQueryIO.read( (SchemaAndRecord elem) -> (Double) elem.getRecord().get("max_temperature")) .fromQuery( - "SELECT max_temperature FROM [clouddataflow-readonly:samples.weather_stations]") + "SELECT max_temperature FROM [apache-beam-testing.samples.weather_stations]") .withCoder(DoubleCoder.of())); // [END BigQueryReadQuery] } @@ -280,7 +280,7 @@ public class Snippets { // [END BigQuerySchemaJson] { - String tableSpec = "clouddataflow-readonly:samples.weather_stations"; + String tableSpec = "apache-beam-testing.samples.weather_stations"; if (!writeProject.isEmpty() && !writeDataset.isEmpty() && !writeTable.isEmpty()) { tableSpec = writeProject + ":" + writeDataset + "." + writeTable; } @@ -403,7 +403,7 @@ public class Snippets { }) .fromQuery( "SELECT year, month, day, max_temperature " - + "FROM [clouddataflow-readonly:samples.weather_stations] " + + "FROM [apache-beam-testing.samples.weather_stations] " + "WHERE year BETWEEN 2007 AND 2009") .withCoder(AvroCoder.of(WeatherData.class))); @@ -461,7 +461,7 @@ public class Snippets { .withWriteDisposition(WriteDisposition.WRITE_TRUNCATE)); // [END BigQueryWriteDynamicDestinations] - String tableSpec = "clouddataflow-readonly:samples.weather_stations"; + String tableSpec = "apache-beam-testing.samples.weather_stations"; if (!writeProject.isEmpty() && !writeDataset.isEmpty() && !writeTable.isEmpty()) { tableSpec = writeProject + ":" + writeDataset + "." + writeTable + "_partitioning"; } diff --git a/examples/kotlin/src/main/java/org/apache/beam/examples/kotlin/cookbook/BigQueryTornadoes.kt b/examples/kotlin/src/main/java/org/apache/beam/examples/kotlin/cookbook/BigQueryTornadoes.kt index f4547bc8cbe..ec56bc65997 100644 --- a/examples/kotlin/src/main/java/org/apache/beam/examples/kotlin/cookbook/BigQueryTornadoes.kt +++ b/examples/kotlin/src/main/java/org/apache/beam/examples/kotlin/cookbook/BigQueryTornadoes.kt @@ -60,12 +60,12 @@ import org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.collect.Lists * See examples/java/README.md for instructions about how to configure different runners. * * - * The BigQuery input table defaults to `clouddataflow-readonly:samples.weather_stations` + * The BigQuery input table defaults to `apache-beam-testing.samples.weather_stations` * and can be overridden with `--input`. */ object BigQueryTornadoes { // Default to using a 1000 row subset of the public weather station table publicdata:samples.gsod. - private const val WEATHER_SAMPLES_TABLE = "clouddataflow-readonly:samples.weather_stations" + private const val WEATHER_SAMPLES_TABLE = "apache-beam-testing.samples.weather_stations" /** * Examines each row in the input table. If a tornado was recorded in that sample, the month in diff --git a/examples/kotlin/src/main/java/org/apache/beam/examples/kotlin/cookbook/FilterExamples.kt b/examples/kotlin/src/main/java/org/apache/beam/examples/kotlin/cookbook/FilterExamples.kt index e8c670e4d0f..2625f5bfec1 100644 --- a/examples/kotlin/src/main/java/org/apache/beam/examples/kotlin/cookbook/FilterExamples.kt +++ b/examples/kotlin/src/main/java/org/apache/beam/examples/kotlin/cookbook/FilterExamples.kt @@ -65,12 +65,12 @@ import java.util.logging.Logger * See examples/kotlin/README.md for instructions about how to configure different runners. * * - * The BigQuery input table defaults to `clouddataflow-readonly:samples.weather_stations` + * The BigQuery input table defaults to `apache-beam-testing.samples.weather_stations` * and can be overridden with `--input`. */ object FilterExamples { // Default to using a 1000 row subset of the public weather station table publicdata:samples.gsod. - private const val WEATHER_SAMPLES_TABLE = "clouddataflow-readonly:samples.weather_stations" + private const val WEATHER_SAMPLES_TABLE = "apache-beam-testing.samples.weather_stations" internal val LOG = Logger.getLogger(FilterExamples::class.java.name) internal const val MONTH_TO_FILTER = 7 diff --git a/examples/kotlin/src/main/java/org/apache/beam/examples/kotlin/cookbook/JoinExamples.kt b/examples/kotlin/src/main/java/org/apache/beam/examples/kotlin/cookbook/JoinExamples.kt index 3b7f3c4c358..2f2215e1d96 100644 --- a/examples/kotlin/src/main/java/org/apache/beam/examples/kotlin/cookbook/JoinExamples.kt +++ b/examples/kotlin/src/main/java/org/apache/beam/examples/kotlin/cookbook/JoinExamples.kt @@ -60,7 +60,7 @@ import org.apache.beam.sdk.values.TupleTag object JoinExamples { // A 1000-row sample of the GDELT data here: gdelt-bq:full.events. - private const val GDELT_EVENTS_TABLE = "clouddataflow-readonly:samples.gdelt_sample" + private const val GDELT_EVENTS_TABLE = "apache-beam-testing.samples.gdelt_sample" // A table that maps country codes to country names. private const val COUNTRY_CODES = "gdelt-bq:full.crosswalk_geocountrycodetohuman" diff --git a/examples/kotlin/src/main/java/org/apache/beam/examples/kotlin/cookbook/MaxPerKeyExamples.kt b/examples/kotlin/src/main/java/org/apache/beam/examples/kotlin/cookbook/MaxPerKeyExamples.kt index 74d392de4e2..11418d3933c 100644 --- a/examples/kotlin/src/main/java/org/apache/beam/examples/kotlin/cookbook/MaxPerKeyExamples.kt +++ b/examples/kotlin/src/main/java/org/apache/beam/examples/kotlin/cookbook/MaxPerKeyExamples.kt @@ -60,12 +60,12 @@ import java.util.ArrayList * See examples/java/README.md for instructions about how to configure different runners. * * - * The BigQuery input table defaults to `clouddataflow-readonly:samples.weather_stations ` + * The BigQuery input table defaults to `apache-beam-testing.samples.weather_stations ` * and can be overridden with `--input`. */ object MaxPerKeyExamples { // Default to using a 1000 row subset of the public weather station table publicdata:samples.gsod. - private const val WEATHER_SAMPLES_TABLE = "clouddataflow-readonly:samples.weather_stations" + private const val WEATHER_SAMPLES_TABLE = "apache-beam-testing.samples.weather_stations" /** * Examines each row (weather reading) in the input table. Output the month of the reading, and diff --git a/examples/kotlin/src/main/java/org/apache/beam/examples/kotlin/snippets/Snippets.kt b/examples/kotlin/src/main/java/org/apache/beam/examples/kotlin/snippets/Snippets.kt index 2ba7b3742e1..d2f58c215a5 100644 --- a/examples/kotlin/src/main/java/org/apache/beam/examples/kotlin/snippets/Snippets.kt +++ b/examples/kotlin/src/main/java/org/apache/beam/examples/kotlin/snippets/Snippets.kt @@ -84,7 +84,7 @@ object Snippets { pipeline: Pipeline, writeProject: String = "", writeDataset: String = "", writeTable: String = "") { run { // [START BigQueryTableSpec] - val tableSpec = "clouddataflow-readonly:samples.weather_stations" + val tableSpec = "apache-beam-testing.samples.weather_stations" // [END BigQueryTableSpec] } @@ -104,7 +104,7 @@ object Snippets { } run { - val tableSpec = "clouddataflow-readonly:samples.weather_stations" + val tableSpec = "apache-beam-testing.samples.weather_stations" // [START BigQueryReadTable] val maxTemperatures = pipeline.apply(BigQueryIO.readTableRows().from(tableSpec)) // Each row is of type TableRow @@ -118,7 +118,7 @@ object Snippets { } run { - val tableSpec = "clouddataflow-readonly:samples.weather_stations" + val tableSpec = "apache-beam-testing.samples.weather_stations" // [START BigQueryReadFunction] val maxTemperatures = pipeline.apply( BigQueryIO.read { it.record["max_temperature"] as Double? } @@ -132,7 +132,7 @@ object Snippets { val maxTemperatures = pipeline.apply( BigQueryIO.read { it.record["max_temperature"] as Double? } .fromQuery( - "SELECT max_temperature FROM [clouddataflow-readonly:samples.weather_stations]") + "SELECT max_temperature FROM [apache-beam-testing.samples.weather_stations]") .withCoder(DoubleCoder.of())) // [END BigQueryReadQuery] } @@ -167,7 +167,7 @@ object Snippets { // [END BigQuerySchemaJson] run { - var tableSpec = "clouddataflow-readonly:samples.weather_stations" + var tableSpec = "apache-beam-testing.samples.weather_stations" if (writeProject.isNotEmpty() && writeDataset.isNotEmpty() && writeTable.isNotEmpty()) { tableSpec = "$writeProject:$writeDataset.$writeTable" } @@ -259,7 +259,7 @@ object Snippets { } .fromQuery(""" SELECT year, month, day, max_temperature - FROM [clouddataflow-readonly:samples.weather_stations] + FROM [apache-beam-testing.samples.weather_stations] WHERE year BETWEEN 2007 AND 2009 """.trimIndent()) .withCoder(AvroCoder.of(WeatherData::class.java))) @@ -297,7 +297,7 @@ object Snippets { .withWriteDisposition(WriteDisposition.WRITE_TRUNCATE)) // [END BigQueryWriteDynamicDestinations] - var tableSpec = "clouddataflow-readonly:samples.weather_stations" + var tableSpec = "apache-beam-testing.samples.weather_stations" if (writeProject.isNotEmpty() && writeDataset.isNotEmpty() && writeTable.isNotEmpty()) { tableSpec = "$writeProject:$writeDataset.${writeTable}_partitioning" } diff --git a/learning/tour-of-beam/learning-content/io/big-query-io/read-table/description.md b/learning/tour-of-beam/learning-content/io/big-query-io/read-table/description.md index 23344989d0a..a3f1c1993d9 100644 --- a/learning/tour-of-beam/learning-content/io/big-query-io/read-table/description.md +++ b/learning/tour-of-beam/learning-content/io/big-query-io/read-table/description.md @@ -35,7 +35,7 @@ The `logOutput` struct is defined as a custom `DoFn` that implements the Process {{if (eq .Sdk "java")}} ``` PCollection<TableRow> pCollection = pipeline - .apply("ReadFromBigQuery", BigQueryIO.readTableRows().from("clouddataflow-readonly:samples.weather_stations").withMethod(TypedRead.Method.DIRECT_READ)) + .apply("ReadFromBigQuery", BigQueryIO.readTableRows().from("apache-beam-testing.samples.weather_stations").withMethod(TypedRead.Method.DIRECT_READ)) ``` The `BigQueryIO.readTableRows()` method is called to create a `BigQueryIO.Read` transform that will read data from a `BigQuery` table. diff --git a/learning/tour-of-beam/learning-content/io/big-query-io/read-table/java-example/Task.java b/learning/tour-of-beam/learning-content/io/big-query-io/read-table/java-example/Task.java index 206a0c0b8ee..63f5afd2357 100644 --- a/learning/tour-of-beam/learning-content/io/big-query-io/read-table/java-example/Task.java +++ b/learning/tour-of-beam/learning-content/io/big-query-io/read-table/java-example/Task.java @@ -65,7 +65,7 @@ public class Task { */ PCollection<TableRow> pCollection = pipeline - .apply("ReadFromBigQuery", BigQueryIO.readTableRows().from("clouddataflow-readonly:samples.weather_stations").withMethod(TypedRead.Method.DIRECT_READ)); + .apply("ReadFromBigQuery", BigQueryIO.readTableRows().from("apache-beam-testing.samples.weather_stations").withMethod(TypedRead.Method.DIRECT_READ)); final PTransform<PCollection<TableRow>, PCollection<Iterable<TableRow>>> sample = Sample.fixedSizeGlobally(5); diff --git a/learning/tour-of-beam/learning-content/io/rest-api/description.md b/learning/tour-of-beam/learning-content/io/rest-api/description.md index 3ebdd2d0afe..8f7d9ed7f56 100644 --- a/learning/tour-of-beam/learning-content/io/rest-api/description.md +++ b/learning/tour-of-beam/learning-content/io/rest-api/description.md @@ -31,7 +31,7 @@ PCollection<WeatherData> weatherData = }) .fromQuery( "SELECT year, month, day, max_temperature " - + "FROM [clouddataflow-readonly:samples.weather_stations] " + + "FROM [apache-beam-testing.samples.weather_stations] " + "WHERE year BETWEEN 2007 AND 2009") .withCoder(AvroCoder.of(WeatherData.class))); diff --git a/playground/backend/internal/fs_tool/ExampleData.scala b/playground/backend/internal/fs_tool/ExampleData.scala index 4283394c400..e7cdfabce4b 100644 --- a/playground/backend/internal/fs_tool/ExampleData.scala +++ b/playground/backend/internal/fs_tool/ExampleData.scala @@ -26,8 +26,8 @@ object ExampleData { "gs://apache-beam-samples/traffic_sensor/Freeways-5Minaa2010-01-01_to_2010-02-15_test2.csv" val GAMING = "gs://apache-beam-samples/game/gaming_data*.csv" - val WEATHER_SAMPLES_TABLE = "clouddataflow-readonly:samples.weather_stations" + val WEATHER_SAMPLES_TABLE = "apache-beam-testing.samples.weather_stations" val SHAKESPEARE_TABLE = "bigquery-public-data:samples.shakespeare" - val EVENT_TABLE = "clouddataflow-readonly:samples.gdelt_sample" + val EVENT_TABLE = "apache-beam-testing.samples.gdelt_sample" val COUNTRY_TABLE = "gdelt-bq:full.crosswalk_geocountrycodetohuman" } diff --git a/sdks/go/examples/cookbook/filter/filter.go b/sdks/go/examples/cookbook/filter/filter.go index 68d81af98bb..56b18390a70 100644 --- a/sdks/go/examples/cookbook/filter/filter.go +++ b/sdks/go/examples/cookbook/filter/filter.go @@ -32,7 +32,7 @@ import ( ) var ( - input = flag.String("input", "clouddataflow-readonly:samples.weather_stations", "Weather data BQ table.") + input = flag.String("input", "apache-beam-testing.samples.weather_stations", "Weather data BQ table.") output = flag.String("output", "", "Output BQ table.") month = flag.Int("month_filter", 7, "Numerical month to analyze") ) diff --git a/sdks/go/examples/cookbook/join/join.go b/sdks/go/examples/cookbook/join/join.go index 25c9fb71c07..e2e8fb019b8 100644 --- a/sdks/go/examples/cookbook/join/join.go +++ b/sdks/go/examples/cookbook/join/join.go @@ -34,7 +34,7 @@ import ( // See: https://github.com/apache/beam/blob/master/examples/java/src/main/java/org/apache/beam/examples/cookbook/JoinExamples.java const ( - gdeltEventsTable = "clouddataflow-readonly:samples.gdelt_sample" + gdeltEventsTable = "apache-beam-testing.samples.gdelt_sample" countryCodesTable = "gdelt-bq:full.crosswalk_geocountrycodetohuman" ) diff --git a/sdks/go/examples/cookbook/max/max.go b/sdks/go/examples/cookbook/max/max.go index fa6c0e2c535..89b1ca24400 100644 --- a/sdks/go/examples/cookbook/max/max.go +++ b/sdks/go/examples/cookbook/max/max.go @@ -32,7 +32,7 @@ import ( ) var ( - input = flag.String("input", "clouddataflow-readonly:samples.weather_stations", "Weather data BQ table.") + input = flag.String("input", "apache-beam-testing.samples.weather_stations", "Weather data BQ table.") output = flag.String("output", "", "Output BQ table.") ) diff --git a/sdks/go/examples/cookbook/tornadoes/tornadoes.go b/sdks/go/examples/cookbook/tornadoes/tornadoes.go index 1810f63e353..bd327bfba12 100644 --- a/sdks/go/examples/cookbook/tornadoes/tornadoes.go +++ b/sdks/go/examples/cookbook/tornadoes/tornadoes.go @@ -29,7 +29,7 @@ // // --output=YOUR_PROJECT_ID:DATASET_ID.TABLE_ID // -// The BigQuery input table defaults to clouddataflow-readonly:samples.weather_stations +// The BigQuery input table defaults to apache-beam-testing.samples.weather_stations // and can be overridden with {@code --input}. package main @@ -48,7 +48,7 @@ import ( ) var ( - input = flag.String("input", "clouddataflow-readonly:samples.weather_stations", "BigQuery table with weather data to read from, specified as <project_id>:<dataset_id>.<table_id>") + input = flag.String("input", "apache-beam-testing.samples.weather_stations", "BigQuery table with weather data to read from, specified as <project_id>:<dataset_id>.<table_id>") output = flag.String("output", "", "BigQuery table to write to, specified as <project_id>:<dataset_id>.<table_id>. The dataset must already exist") ) diff --git a/sdks/java/core/src/main/java/org/apache/beam/sdk/io/package-info.java b/sdks/java/core/src/main/java/org/apache/beam/sdk/io/package-info.java index df4efa1b603..3f2433c1f26 100644 --- a/sdks/java/core/src/main/java/org/apache/beam/sdk/io/package-info.java +++ b/sdks/java/core/src/main/java/org/apache/beam/sdk/io/package-info.java @@ -24,7 +24,7 @@ * * <pre>{@code * PCollection<TableRow> inputData = pipeline.apply( - * BigQueryIO.readTableRows().from("clouddataflow-readonly:samples.weather_stations")); + * BigQueryIO.readTableRows().from("apache-beam-testing.samples.weather_stations")); * }</pre> * * and {@code Write} transforms that persist PCollections to external storage: diff --git a/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryIO.java b/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryIO.java index fd445bcfc39..96da67321cb 100644 --- a/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryIO.java +++ b/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryIO.java @@ -268,7 +268,7 @@ import org.slf4j.LoggerFactory; * * <pre>{@code * PCollection<TableRow> weatherData = pipeline.apply( - * BigQueryIO.readTableRows().from("clouddataflow-readonly:samples.weather_stations")); + * BigQueryIO.readTableRows().from("apache-beam-testing.samples.weather_stations")); * }</pre> * * <b>Example: Reading rows of a table and parsing them into a custom type.</b> @@ -281,7 +281,7 @@ import org.slf4j.LoggerFactory; * return new WeatherRecord(...); * } * }) - * .from("clouddataflow-readonly:samples.weather_stations")) + * .from("apache-beam-testing.samples.weather_stations")) * .withCoder(SerializableCoder.of(WeatherRecord.class)); * }</pre> * diff --git a/sdks/java/io/google-cloud-platform/src/test/java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryClusteringIT.java b/sdks/java/io/google-cloud-platform/src/test/java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryClusteringIT.java index 67777b26588..1b3c844e2a9 100644 --- a/sdks/java/io/google-cloud-platform/src/test/java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryClusteringIT.java +++ b/sdks/java/io/google-cloud-platform/src/test/java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryClusteringIT.java @@ -50,7 +50,7 @@ public class BigQueryClusteringIT { private static final Long EXPECTED_BYTES = 16000L; private static final BigInteger EXPECTED_ROWS = new BigInteger("1000"); private static final String WEATHER_SAMPLES_TABLE = - "clouddataflow-readonly:samples.weather_stations"; + "apache-beam-testing.samples.weather_stations"; private static final String DATASET_NAME = "BigQueryClusteringIT"; private static final Clustering CLUSTERING = new Clustering().setFields(Arrays.asList("station_number")); diff --git a/sdks/java/io/google-cloud-platform/src/test/java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryTimePartitioningClusteringIT.java b/sdks/java/io/google-cloud-platform/src/test/java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryTimePartitioningClusteringIT.java index 7e945517cfa..3ceb6f0966b 100644 --- a/sdks/java/io/google-cloud-platform/src/test/java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryTimePartitioningClusteringIT.java +++ b/sdks/java/io/google-cloud-platform/src/test/java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryTimePartitioningClusteringIT.java @@ -48,7 +48,7 @@ import org.junit.runners.JUnit4; @RunWith(JUnit4.class) public class BigQueryTimePartitioningClusteringIT { private static final String WEATHER_SAMPLES_TABLE = - "clouddataflow-readonly:samples.weather_stations"; + "apache-beam-testing.samples.weather_stations"; private static final String DATASET_NAME = "BigQueryTimePartitioningIT"; private static final TimePartitioning TIME_PARTITIONING = new TimePartitioning().setField("date").setType("DAY"); diff --git a/sdks/python/apache_beam/examples/cookbook/bigquery_tornadoes.py b/sdks/python/apache_beam/examples/cookbook/bigquery_tornadoes.py index 224a2ad586c..ede667fd9ef 100644 --- a/sdks/python/apache_beam/examples/cookbook/bigquery_tornadoes.py +++ b/sdks/python/apache_beam/examples/cookbook/bigquery_tornadoes.py @@ -68,7 +68,7 @@ def run(argv=None): parser = argparse.ArgumentParser() parser.add_argument( '--input', - default='clouddataflow-readonly:samples.weather_stations', + default='apache-beam-testing.samples.weather_stations', help=( 'Input BigQuery table to process specified as: ' 'PROJECT:DATASET.TABLE or DATASET.TABLE.')) diff --git a/sdks/python/apache_beam/examples/cookbook/filters.py b/sdks/python/apache_beam/examples/cookbook/filters.py index fda07064fa0..daa01b0658b 100644 --- a/sdks/python/apache_beam/examples/cookbook/filters.py +++ b/sdks/python/apache_beam/examples/cookbook/filters.py @@ -79,7 +79,7 @@ def run(argv=None): parser.add_argument( '--input', help='BigQuery table to read from.', - default='clouddataflow-readonly:samples.weather_stations') + default='apache-beam-testing.samples.weather_stations') parser.add_argument( '--output', required=True, help='BigQuery table to write to.') parser.add_argument( diff --git a/sdks/python/apache_beam/examples/snippets/snippets.py b/sdks/python/apache_beam/examples/snippets/snippets.py index e4184f37889..715011d302d 100644 --- a/sdks/python/apache_beam/examples/snippets/snippets.py +++ b/sdks/python/apache_beam/examples/snippets/snippets.py @@ -890,7 +890,7 @@ def model_bigqueryio( # [START model_bigqueryio_table_spec] # project-id:dataset_id.table_id - table_spec = 'clouddataflow-readonly:samples.weather_stations' + table_spec = 'apache-beam-testing.samples.weather_stations' # [END model_bigqueryio_table_spec] # [START model_bigqueryio_table_spec_without_project] @@ -936,7 +936,7 @@ def model_bigqueryio( pipeline | 'QueryTable' >> beam.io.ReadFromBigQuery( query='SELECT max_temperature FROM '\ - '[clouddataflow-readonly:samples.weather_stations]') + '[apache-beam-testing.samples.weather_stations]') # Each row is a dictionary where the keys are the BigQuery columns | beam.Map(lambda elem: elem['max_temperature'])) # [END model_bigqueryio_read_query] @@ -1036,7 +1036,7 @@ def model_bigqueryio_xlang( # use a table that does not exist import uuid never_exists_table = str(uuid.uuid4()) - table_spec = 'clouddataflow-readonly:samples.{}'.format(never_exists_table) + table_spec = 'apache-beam-testing.samples.{}'.format(never_exists_table) if write_project and write_dataset and write_table: table_spec = '{}:{}.{}'.format(write_project, write_dataset, write_table)