damondouglas commented on code in PR #24479:
URL: https://github.com/apache/beam/pull/24479#discussion_r1039896976


##########
sdks/java/io/fileschematransform/src/main/java/org/apache/beam/sdk/io/fileschematransform/FileWriteSchemaTransformConfiguration.java:
##########
@@ -0,0 +1,215 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.beam.sdk.io.fileschematransform;
+
+import com.google.auto.value.AutoValue;
+import javax.annotation.Nullable;
+import org.apache.beam.sdk.schemas.AutoValueSchema;
+import org.apache.beam.sdk.schemas.annotations.DefaultSchema;
+
+/**
+ * The configuration for building file writing transforms using {@link
+ * org.apache.beam.sdk.schemas.transforms.SchemaTransform} and {@link
+ * org.apache.beam.sdk.schemas.transforms.SchemaTransformProvider}.
+ */
+@DefaultSchema(AutoValueSchema.class)
+@AutoValue
+public abstract class FileWriteSchemaTransformConfiguration {
+
+  public static FileWriteSchemaTransformConfiguration.Builder builder() {
+    return new AutoValue_FileWriteSchemaTransformConfiguration.Builder();
+  }
+
+  /**
+   * The format of the file content. Used as {@link String} key lookup of 
{@link
+   * FileWriteSchemaTransformFormatProviders#loadProviders()}.
+   */
+  public abstract String getFormat();
+
+  /** Specifies a common prefix to use for all generated filenames. */
+  public abstract String getFilenamePrefix();
+
+  /**
+   * Specifies to compress all generated shard files by default, append the 
respective extension to
+   * the filename. See {@link org.apache.beam.sdk.io.Compression} for expected 
values, though
+   * stringified in all lowercase format.
+   */
+  @Nullable
+  public abstract String getCompression();
+
+  /** The custom delimiter to be used in place of the default ones ('\r', '\n' 
or '\r\n'). */
+  @Nullable
+  public abstract String getDelimiter();
+
+  /** The number of output shards produced; a value of 1 disables sharding. */
+  @Nullable
+  public abstract Integer getNumShards();

Review Comment:
   I wanted to respect that there was a reason sharding properties are exposed 
in the FileIO/TextIO write.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to