Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add groupName attribute to v2 template where it's needed (part 2) #1541

Merged
merged 3 commits into from
Jun 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ public interface TransformOptions
@TemplateParameter.BigQueryTable(
order = 1,
description = "BigQuery output table",
groupName = "Target",
helpText =
"BigQuery table location to write the output to. The table's schema must match the "
+ "input JSON objects.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public interface ReadFromPubSubOptions extends PipelineOptions {
@TemplateParameter.PubsubSubscription(
order = 1,
description = "Pub/Sub input subscription",
groupName = "Source",
helpText =
"Pub/Sub subscription to read the input from, in the format of 'projects/your-project-id/subscriptions/your-subscription-name'")
String getInputSubscription();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ public interface SinkOptions
@TemplateParameter.BigQueryTable(
order = 1,
optional = true,
groupName = "Target",
description = "BigQuery output table",
helpText =
"BigQuery table location to write the output to. The table's schema must match the "
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public class WriteToPubSub implements TemplateTransform<WriteToPubSubOptions> {
public interface WriteToPubSubOptions extends PipelineOptions {
@TemplateParameter.PubsubTopic(
order = 8,
groupName = "Target",
description = "Output Pub/Sub topic",
helpText =
"The name of the topic to which data should published, in the format of 'projects/your-project-id/topics/your-topic-name'",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ public interface BigQueryDlqOptions extends PipelineOptions {
@TemplateParameter.BigQueryTable(
order = 4,
optional = true,
groupName = "Target",
description =
"Table for messages failed to reach the output table (i.e., Deadletter table)",
helpText =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ public interface ReadFromJdbcOptions extends PipelineOptions {
@TemplateParameter.Text(
order = 2,
optional = false,
groupName = "Source",
regexes = {
"(^jdbc:[a-zA-Z0-9/:@.?_+!*=&-;]+$)|(^([A-Za-z0-9+/]{4}){1,}([A-Za-z0-9+/]{0,3})={0,3})"
},
Expand Down Expand Up @@ -116,7 +117,6 @@ public interface ReadFromJdbcOptions extends PipelineOptions {
@TemplateParameter.Text(
order = 9,
optional = true,
groupName = "Source Parameters",
description = "The name of a column of numeric type that will be used for partitioning.",
helpText =
"If this parameter is provided (along with `table`), JdbcIO reads the table in parallel by executing multiple instances of the query on the same table (subquery) using ranges. Currently, only Long partition columns are supported.")
Expand All @@ -127,7 +127,7 @@ public interface ReadFromJdbcOptions extends PipelineOptions {
@TemplateParameter.Text(
order = 10,
optional = true,
groupName = "Source Parameters",
groupName = "Source",
description = "Name of the table in the external database.",
helpText =
"Table to read from using partitions. This parameter also accepts a subquery in parentheses.",
Expand All @@ -139,7 +139,6 @@ public interface ReadFromJdbcOptions extends PipelineOptions {
@TemplateParameter.Integer(
order = 11,
optional = true,
groupName = "Source Parameters",
description = "The number of partitions.",
helpText =
"The number of partitions. This, along with the lower and upper bound, form partitions strides for generated WHERE clause expressions used to split the partition column evenly. When the input is less than 1, the number is set to 1.")
Expand All @@ -150,7 +149,6 @@ public interface ReadFromJdbcOptions extends PipelineOptions {
@TemplateParameter.Long(
order = 12,
optional = true,
groupName = "Source Parameters",
description = "Lower bound of partition column.",
helpText =
"Lower bound used in the partition scheme. If not provided, it is automatically inferred by Beam (for the supported types)")
Expand All @@ -161,7 +159,6 @@ public interface ReadFromJdbcOptions extends PipelineOptions {
@TemplateParameter.Long(
order = 13,
optional = true,
groupName = "Source Parameters",
description = "Upper bound of partition column",
helpText =
"Upper bound used in partition scheme. If not provided, it is automatically inferred by Beam (for the supported types)")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ public interface WriteOptions extends PipelineOptions {
@TemplateParameter.BigQueryTable(
order = 1,
description = "BigQuery output table",
groupName = "Target",
helpText =
"The BigQuery output table location to write the output to. For example, `<PROJECT_ID>:<DATASET_NAME>.<TABLE_NAME>`."
+ "Depending on the `createDisposition` specified, the output table might be created automatically using the user provided Avro schema.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public interface ReadSubscriptionOptions extends PipelineOptions {

@TemplateParameter.PubsubSubscription(
order = 1,
groupName = "Source",
description = "Pub/Sub input subscription",
helpText = "The Pub/Sub input subscription to read from.",
example = "projects/<PROJECT_ID>/subscription/<SUBSCRIPTION_ID>")
Expand Down Expand Up @@ -62,6 +63,7 @@ public interface WriteTopicOptions extends PipelineOptions {

@TemplateParameter.PubsubTopic(
order = 3,
groupName = "Target",
description = "Output Pub/Sub topic",
helpText = "The Pub/Sub topic to use for unprocessed records.",
example = "projects/<PROJECT_ID>/topics/<TOPIC_NAME>")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public interface ElasticsearchWriteOptions extends PipelineOptions {

@TemplateParameter.Text(
order = 1,
groupName = "Target",
description = "Elasticsearch URL or CloudID if using Elastic Cloud",
helpText =
"The Elasticsearch URL in the format https://hostname:[port]. If using Elastic Cloud, specify the CloudID.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ public interface PubSubToElasticsearchOptions

@TemplateParameter.PubsubSubscription(
order = 1,
groupName = "Source",
description = "Pub/Sub input subscription",
helpText =
"Pub/Sub subscription to consume the input from. Name should be in the format of 'projects/your-project-id/subscriptions/your-subscription-name'",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ public interface PubsubToJdbcOptions extends CommonTemplateOptions {

@TemplateParameter.PubsubSubscription(
order = 1,
groupName = "Source",
description = "Pub/Sub input subscription",
helpText =
"The Pub/Sub input subscription to read from, in the format of 'projects/<PROJECT_ID>/subscriptions/<SUBSCRIPTION_NAME>'",
Expand All @@ -48,6 +49,7 @@ public interface PubsubToJdbcOptions extends CommonTemplateOptions {

@TemplateParameter.Text(
order = 3,
groupName = "Target",
optional = false,
regexes = {
"(^jdbc:[a-zA-Z0-9/:@.?_+!*=&-;]+$)|(^([A-Za-z0-9+/]{4}){1,}([A-Za-z0-9+/]{0,3})={0,3})"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public interface SpannerChangeStreamsToBigQueryOptions

@TemplateParameter.ProjectId(
order = 1,
groupName = "Source",
optional = true,
description = "Spanner Project ID",
helpText =
Expand All @@ -43,6 +44,7 @@ public interface SpannerChangeStreamsToBigQueryOptions

@TemplateParameter.Text(
order = 2,
groupName = "Source",
description = "Spanner instance ID",
helpText = "The Spanner instance to read change streams from.")
@Validation.Required
Expand All @@ -52,6 +54,7 @@ public interface SpannerChangeStreamsToBigQueryOptions

@TemplateParameter.Text(
order = 3,
groupName = "Source",
description = "Spanner database",
helpText = "The Spanner database to read change streams from.")
@Validation.Required
Expand Down Expand Up @@ -105,6 +108,7 @@ public interface SpannerChangeStreamsToBigQueryOptions

@TemplateParameter.Text(
order = 8,
groupName = "Source",
description = "Spanner change stream",
helpText = "The name of the Spanner change stream to read from.")
@Validation.Required
Expand Down Expand Up @@ -166,6 +170,7 @@ public interface SpannerChangeStreamsToBigQueryOptions

@TemplateParameter.Text(
order = 13,
groupName = "Target",
description = "BigQuery dataset",
helpText = "The BigQuery dataset for change streams output.")
@Validation.Required
Expand All @@ -175,6 +180,7 @@ public interface SpannerChangeStreamsToBigQueryOptions

@TemplateParameter.ProjectId(
order = 14,
groupName = "Target",
optional = true,
description = "BigQuery project ID",
helpText = "The BigQuery project. The default value is the project for the Dataflow job.")
Expand All @@ -185,6 +191,7 @@ public interface SpannerChangeStreamsToBigQueryOptions

@TemplateParameter.Text(
order = 15,
groupName = "Target",
optional = true,
description = "BigQuery table name Template",
helpText = "The template for the name of the BigQuery table that contains the changelog.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ public interface SpannerChangeStreamsToGcsOptions

@TemplateParameter.ProjectId(
order = 1,
groupName = "Source",
optional = true,
description = "Spanner Project ID",
helpText =
Expand All @@ -47,6 +48,7 @@ public interface SpannerChangeStreamsToGcsOptions

@TemplateParameter.Text(
order = 2,
groupName = "Source",
description = "Spanner instance ID",
helpText = "The Spanner instance ID to read change streams data from.")
@Validation.Required
Expand All @@ -56,6 +58,7 @@ public interface SpannerChangeStreamsToGcsOptions

@TemplateParameter.Text(
order = 3,
groupName = "Source",
description = "Spanner database",
helpText = "The Spanner database to read change streams data from.")
@Validation.Required
Expand Down Expand Up @@ -103,6 +106,7 @@ public interface SpannerChangeStreamsToGcsOptions

@TemplateParameter.Text(
order = 8,
groupName = "Source",
description = "Spanner change stream",
helpText = "The name of the Spanner change stream to read from.")
@Validation.Required
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public interface SpannerChangeStreamsToPubSubOptions extends DataflowPipelineOpt

@TemplateParameter.ProjectId(
order = 1,
groupName = "Source",
optional = true,
description = "Spanner Project ID",
helpText =
Expand All @@ -42,6 +43,7 @@ public interface SpannerChangeStreamsToPubSubOptions extends DataflowPipelineOpt

@TemplateParameter.Text(
order = 2,
groupName = "Source",
description = "Spanner instance ID",
helpText = "The Spanner instance to read change streams from.")
@Validation.Required
Expand All @@ -51,6 +53,7 @@ public interface SpannerChangeStreamsToPubSubOptions extends DataflowPipelineOpt

@TemplateParameter.Text(
order = 3,
groupName = "Source",
description = "Spanner database",
helpText = "The Spanner database to read change streams from.")
@Validation.Required
Expand Down Expand Up @@ -104,6 +107,7 @@ public interface SpannerChangeStreamsToPubSubOptions extends DataflowPipelineOpt

@TemplateParameter.Text(
order = 8,
groupName = "Source",
description = "Spanner change stream",
helpText = "The name of the Spanner change stream to read from.")
@Validation.Required
Expand Down Expand Up @@ -174,6 +178,7 @@ public interface SpannerChangeStreamsToPubSubOptions extends DataflowPipelineOpt

@TemplateParameter.ProjectId(
order = 14,
groupName = "Target",
optional = true,
description = "Pub/Sub Project ID",
helpText =
Expand All @@ -186,6 +191,7 @@ public interface SpannerChangeStreamsToPubSubOptions extends DataflowPipelineOpt

@TemplateParameter.Text(
order = 15,
groupName = "Target",
description = "The output Pub/Sub topic",
helpText = "The Pub/Sub topic for change streams output.")
@Validation.Required
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public interface SpannerToBigQueryOptions

@TemplateParameter.ProjectId(
order = 1,
groupName = "Source",
optional = true,
description = "Spanner Project ID",
helpText =
Expand All @@ -39,6 +40,7 @@ public interface SpannerToBigQueryOptions

@TemplateParameter.Text(
order = 2,
groupName = "Source",
description = "Spanner instance ID",
helpText = "The instance ID of the Spanner database to read from.")
String getSpannerInstanceId();
Expand All @@ -47,6 +49,7 @@ public interface SpannerToBigQueryOptions

@TemplateParameter.Text(
order = 3,
groupName = "Source",
description = "Spanner database ID",
helpText = "The database ID of the Spanner database to export.")
String getSpannerDatabaseId();
Expand All @@ -55,6 +58,7 @@ public interface SpannerToBigQueryOptions

@TemplateParameter.Text(
order = 4,
groupName = "Source",
description = "Spanner table name",
helpText = "The table name of the Spanner database to export.")
String getSpannerTableId();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ public interface Options
DataflowPipelineWorkerPoolOptions {
@TemplateParameter.BigQueryTable(
order = 1,
groupName = "Target",
description = "BigQuery output table",
helpText =
"The BigQuery table to write to, formatted as `\"PROJECT_ID:DATASET_NAME.TABLE_NAME\"`.")
Expand All @@ -190,6 +191,7 @@ public interface Options

@TemplateParameter.PubsubTopic(
order = 2,
groupName = "Source",
optional = true,
description = "Input Pub/Sub topic",
helpText =
Expand All @@ -200,6 +202,7 @@ public interface Options

@TemplateParameter.PubsubSubscription(
order = 3,
groupName = "Source",
optional = true,
description = "Pub/Sub input subscription",
helpText =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ public interface Options
extends PipelineOptions, StreamingOptions, WindowedFilenamePolicyOptions {
@TemplateParameter.PubsubSubscription(
order = 1,
groupName = "Source",
optional = true,
description = "Pub/Sub input subscription",
helpText =
Expand All @@ -102,6 +103,7 @@ public interface Options

@TemplateParameter.PubsubTopic(
order = 2,
groupName = "Source",
optional = true,
description = "Pub/Sub input topic",
helpText =
Expand All @@ -113,6 +115,7 @@ public interface Options

@TemplateParameter.GcsWriteFolder(
order = 3,
groupName = "Target",
optional = false,
description = "Output file directory in Cloud Storage",
helpText =
Expand All @@ -125,6 +128,7 @@ public interface Options

@TemplateParameter.Text(
order = 4,
groupName = "Target",
optional = true,
description = "Output filename prefix of the files to write",
helpText = "The prefix to place on each windowed file.",
Expand All @@ -136,6 +140,7 @@ public interface Options

@TemplateParameter.Text(
order = 5,
groupName = "Target",
optional = true,
description = "Output filename suffix of the files to write",
helpText =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ public interface Options
BigQueryStorageApiBatchOptions {
@TemplateParameter.GcsReadFile(
order = 1,
groupName = "Source",
optional = false,
description = "The GCS location of the text you'd like to process",
helpText = "The gs:// path to the text in Cloud Storage you'd like to process.",
Expand All @@ -234,6 +235,7 @@ public interface Options
@TemplateParameter.BigQueryTable(
order = 3,
optional = false,
groupName = "Target",
description = "Output table to write to",
helpText =
"The location of the BigQuery table to use to store the processed data. If you reuse an existing table, it is overwritten.",
Expand Down