/** * See {@link TypedWrite#to(DynamicAvroDestinations)}. * * @deprecated Use {@link FileIO#write()} or {@link FileIO#writeDynamic()} instead. */ @Deprecated public Write<T> to(DynamicAvroDestinations<T, ?, T> dynamicDestinations) { return new Write<>(inner.to(dynamicDestinations).withFormatFunction(null)); }
.to(new TestDynamicDestinations(baseDir, schemaView)) .withTempDirectory(baseDir);
.apply( AvroIO.<Long, GenericClass>writeCustomType() .to(writePipeline.newProvider(outputFile.getAbsolutePath())) .withFormatFunction(new CreateGenericClass()) .withSchema(ReflectData.get().getSchema(GenericClass.class))
"Store Avro files", AvroIO.<Struct>writeCustomTypeToGenericRecords() .to(new SchemaBasedDynamicDestinations(avroSchemas, outputDirectoryName, resource)) .withTempDirectory(resource));
/** * Writes to file(s) with the given output prefix. See {@link FileSystems} for information on * supported file systems. * * <p>The name of the output files will be determined by the {@link FilenamePolicy} used. * * <p>By default, a {@link DefaultFilenamePolicy} will build output filenames using the * specified prefix, a shard name template (see {@link #withShardNameTemplate(String)}, and a * common suffix (if supplied using {@link #withSuffix(String)}). This default can be overridden * using {@link #to(FilenamePolicy)}. */ public TypedWrite<UserT, DestinationT, OutputT> to(String outputPrefix) { return to(FileBasedSink.convertToFileResourceIfPossible(outputPrefix)); }
/** See {@link TypedWrite#to(FilenamePolicy)}. */ public Write<T> to(FilenamePolicy filenamePolicy) { return new Write<>( inner.to(filenamePolicy).withFormatFunction(SerializableFunctions.identity())); }
/** See {@link TypedWrite#to(ResourceId)} . */ @Experimental(Kind.FILESYSTEM) public Write<T> to(ResourceId outputPrefix) { return new Write<>( inner.to(outputPrefix).withFormatFunction(SerializableFunctions.identity())); }
/** See {@link TypedWrite#to(String)}. */ public Write<T> to(String outputPrefix) { return new Write<>( inner .to(FileBasedSink.convertToFileResourceIfPossible(outputPrefix)) .withFormatFunction(SerializableFunctions.identity())); }
/** See {@link TypedWrite#to(ValueProvider)}. */ public Write<T> to(ValueProvider<String> outputPrefix) { return new Write<>( inner.to(outputPrefix).withFormatFunction(SerializableFunctions.identity())); }