Class TextIO.Write
- All Implemented Interfaces:
Serializable
,HasDisplayData
- Enclosing class:
TextIO
TextIO.write()
.
All methods in this class delegate to the appropriate method of TextIO.TypedWrite
.
This class exists for backwards compatibility, and will be removed in Beam 3.0.
- See Also:
-
Field Summary
Fields inherited from class org.apache.beam.sdk.transforms.PTransform
annotations, displayData, name, resourceHints
-
Method Summary
Modifier and TypeMethodDescriptionexpand
(PCollection<String> input) Override this method to specify how thisPTransform
should be expanded on the givenInputT
.void
populateDisplayData
(DisplayData.Builder builder) Register display data for the given transform or component.to
(FileBasedSink.DynamicDestinations<String, ?, String> dynamicDestinations) Deprecated.to
(FileBasedSink.FilenamePolicy filenamePolicy) to
(ResourceId filenamePrefix) to
(ValueProvider<String> outputPrefix) to
(SerializableFunction<String, DefaultFilenamePolicy.Params> destinationFunction, DefaultFilenamePolicy.Params emptyDestination) Deprecated.toResource
(ValueProvider<ResourceId> filenamePrefix) withBatchMaxBufferingDuration
(@Nullable Duration batchMaxBufferingDuration) withBatchSize
(@Nullable Integer batchSize) withBatchSizeBytes
(@Nullable Integer batchSizeBytes) withCompression
(Compression compression) withDelimiter
(char[] delimiter) withFooter
(@Nullable String footer) withHeader
(@Nullable String header) withMaxNumWritersPerBundle
(@Nullable Integer maxNumWritersPerBundle) withNumShards
(int numShards) withNumShards
(@Nullable ValueProvider<Integer> numShards) <DestinationT>
TextIO.TypedWrite<String, DestinationT> Specify that output filenames are wanted.withShardNameTemplate
(String shardTemplate) withSuffix
(String filenameSuffix) withTempDirectory
(ResourceId tempDirectory) withTempDirectory
(ValueProvider<ResourceId> tempDirectory) withWritableByteChannelFactory
(FileBasedSink.WritableByteChannelFactory writableByteChannelFactory) Methods inherited from class org.apache.beam.sdk.transforms.PTransform
addAnnotation, compose, compose, getAdditionalInputs, getAnnotations, getDefaultOutputCoder, getDefaultOutputCoder, getDefaultOutputCoder, getKindString, getName, getResourceHints, setDisplayData, setResourceHints, toString, validate, validate
-
Method Details
-
to
-
to
-
to
-
toResource
-
to
-
to
@Deprecated public TextIO.Write to(FileBasedSink.DynamicDestinations<String, ?, String> dynamicDestinations) Deprecated. -
to
@Deprecated public TextIO.Write to(SerializableFunction<String, DefaultFilenamePolicy.Params> destinationFunction, DefaultFilenamePolicy.Params emptyDestination) Deprecated. -
withTempDirectory
-
withTempDirectory
-
withShardNameTemplate
-
withSuffix
-
withNumShards
-
withNumShards
-
withoutSharding
-
withDelimiter
-
withHeader
-
withWritableByteChannelFactory
public TextIO.Write withWritableByteChannelFactory(FileBasedSink.WritableByteChannelFactory writableByteChannelFactory) -
withCompression
-
withWindowedWrites
-
withAutoSharding
-
withNoSpilling
-
withMaxNumWritersPerBundle
-
withBatchSize
-
withBatchSizeBytes
-
withBatchMaxBufferingDuration
-
withOutputFilenames
Specify that output filenames are wanted.The nested
TextIO.TypedWrite
transform always has access to output filenames, however due to backwards-compatibility concerns,TextIO.Write
cannot return them. This method simply returns the innerTextIO.TypedWrite
transform which hasWriteFilesResult
as its output type, allowing access to output files.The supplied
DestinationT
type must be: the same as that supplied into(DynamicDestinations)
if that method was used;DefaultFilenamePolicy.Params
ifto(SerializableFunction, Params)
was used, orVoid
otherwise. -
populateDisplayData
Description copied from class:PTransform
Register display data for the given transform or component.populateDisplayData(DisplayData.Builder)
is invoked by Pipeline runners to collect display data viaDisplayData.from(HasDisplayData)
. Implementations may callsuper.populateDisplayData(builder)
in order to register display data in the current namespace, but should otherwise usesubcomponent.populateDisplayData(builder)
to use the namespace of the subcomponent.By default, does not register any display data. Implementors may override this method to provide their own display data.
- Specified by:
populateDisplayData
in interfaceHasDisplayData
- Overrides:
populateDisplayData
in classPTransform<PCollection<String>,
PDone> - Parameters:
builder
- The builder to populate with display data.- See Also:
-
expand
Description copied from class:PTransform
Override this method to specify how thisPTransform
should be expanded on the givenInputT
.NOTE: This method should not be called directly. Instead apply the
PTransform
should be applied to theInputT
using theapply
method.Composite transforms, which are defined in terms of other transforms, should return the output of one of the composed transforms. Non-composite transforms, which do not apply any transforms internally, should return a new unbound output and register evaluators (via backend-specific registration methods).
- Specified by:
expand
in classPTransform<PCollection<String>,
PDone>
-
FileIO.write()
orFileIO.writeDynamic()
()} withTextIO.sink()
instead.