Skip to main content

Sink - FtpSinkBuilder

Sink.FtpSinkBuilder

Create a SinkBuilder to build a data

Sink.

Methods on the SinkBuilder enable you to emit stream data to external systems. If the

Stream is a BlobType, specialised operations can be applied to perform an ftp put of the Stream.

Quality of data can be observed using assert and warn by providing expression based conditions and messages to the whole

Stream.

A corresponding

Template can be created using .toTemplate().

Remarks

See

Transform Data for a related learning module.

Type parameters

NameType
Bextends BlobType
Inputsextends Record

Hierarchy

  • Builder

    FtpSinkBuilder

Sink

toTemplate

toTemplate():

Template

Return a

Template fragment containing the Streams and TaskDescriptions built by this builder.

Returns

Template

Example

 // get a predefined blob stream
const file = Stream("File", BlobType);
// get a predefined uri stream
const uri = Stream("uri", StringType)
// put the contents of the file at the uri
const sink = new SinkBuilder("Ftp")
.from(file)
.input({ name: "uri", stream: uri })
.warn({
predicate: uri => NotEqual(uri, ''),
message: "Uri is empty"
})
.ftp({
uri: (inputs) => inputs.uri,
})
.toTemplate();

Overrides

Builder.toTemplate