public abstract static class CsvIO.Write<T>
extends org.apache.beam.sdk.transforms.PTransform<org.apache.beam.sdk.values.PCollection<T>,org.apache.beam.sdk.io.WriteFilesResult<java.lang.String>>
implements org.apache.beam.sdk.transforms.display.HasDisplayData
PTransform for writing CSV files.| Constructor and Description |
|---|
Write() |
| Modifier and Type | Method and Description |
|---|---|
org.apache.beam.sdk.io.WriteFilesResult<java.lang.String> |
expand(org.apache.beam.sdk.values.PCollection<T> input) |
void |
populateDisplayData(org.apache.beam.sdk.transforms.display.DisplayData.Builder builder) |
CsvIO.Write<T> |
withCompression(org.apache.beam.sdk.io.Compression compression)
Specifies the
Compression of all generated shard files. |
CsvIO.Write<T> |
withNoSpilling()
Whether to skip the spilling of data.
|
CsvIO.Write<T> |
withNumShards(java.lang.Integer numShards)
Specifies to use a given fixed number of shards per window.
|
CsvIO.Write<T> |
withoutSharding()
Forces a single file as output and empty shard name template.
|
CsvIO.Write<T> |
withShardTemplate(java.lang.String shardTemplate)
Uses the given
ShardNameTemplate for naming output files. |
CsvIO.Write<T> |
withSuffix(java.lang.String suffix)
Configures the filename suffix for written files.
|
CsvIO.Write<T> |
withTempDirectory(org.apache.beam.sdk.io.fs.ResourceId tempDirectory)
Set the base directory used to generate temporary files.
|
CsvIO.Write<T> |
withWindowedWrites()
Preserves windowing of input elements and writes them to files based on the element's window.
|
CsvIO.Write<T> |
withWritableByteChannelFactory(org.apache.beam.sdk.io.FileBasedSink.WritableByteChannelFactory writableByteChannelFactory)
Returns a transform for writing to text files like this one but that has the given
FileBasedSink.WritableByteChannelFactory to be used by the FileBasedSink during
output. |
addAnnotation, compose, compose, getAdditionalInputs, getAnnotations, getDefaultOutputCoder, getDefaultOutputCoder, getDefaultOutputCoder, getKindString, getName, getResourceHints, setDisplayData, setResourceHints, toString, validate, validatepublic void populateDisplayData(org.apache.beam.sdk.transforms.display.DisplayData.Builder builder)
populateDisplayData in interface org.apache.beam.sdk.transforms.display.HasDisplayDatapopulateDisplayData in class org.apache.beam.sdk.transforms.PTransform<org.apache.beam.sdk.values.PCollection<T>,org.apache.beam.sdk.io.WriteFilesResult<java.lang.String>>public CsvIO.Write<T> withCompression(org.apache.beam.sdk.io.Compression compression)
Compression of all generated shard files.public CsvIO.Write<T> withNoSpilling()
WriteFiles.withNoSpilling().public CsvIO.Write<T> withNumShards(java.lang.Integer numShards)
TextIO.Write#withNumShards.public CsvIO.Write<T> withoutSharding()
TextIO.Write#withoutSharding.public CsvIO.Write<T> withShardTemplate(java.lang.String shardTemplate)
ShardNameTemplate for naming output files. See TextIO.Write#withShardNameTemplate.public CsvIO.Write<T> withSuffix(java.lang.String suffix)
TextIO.Write#withSuffix.public CsvIO.Write<T> withTempDirectory(org.apache.beam.sdk.io.fs.ResourceId tempDirectory)
TextIO.Write#withTempDirectory.public CsvIO.Write<T> withWindowedWrites()
TextIO.Write#withWindowedWrites.public CsvIO.Write<T> withWritableByteChannelFactory(org.apache.beam.sdk.io.FileBasedSink.WritableByteChannelFactory writableByteChannelFactory)
FileBasedSink.WritableByteChannelFactory to be used by the FileBasedSink during
output. See TextIO.Write#withWritableByteChannelFactory.public org.apache.beam.sdk.io.WriteFilesResult<java.lang.String> expand(org.apache.beam.sdk.values.PCollection<T> input)
expand in class org.apache.beam.sdk.transforms.PTransform<org.apache.beam.sdk.values.PCollection<T>,org.apache.beam.sdk.io.WriteFilesResult<java.lang.String>>