Sink - SinkBuilder
Sink.SinkBuilderCreate a SinkBuilder to build a data
Methods on the SinkBuilder enable you to emit stream data to external systems. If the
Quality of data can be observed using assert and warn by providing expression based conditions
and messages to the whole
A corresponding
Template can be created using.toTemplate().
Param
the name of the
Sink to createRemarks
See
Transform Data for a related learning module.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 })
.assert({
predicate: uri => NotEqual(uri, ''),
message: "Uri is empty"
})
.ftp({
uri: (inputs) => inputs.uri,
})
.toTemplate();
Sink
constructor
• new SinkBuilder(name, module?):
SinkBuilder
Create a SinkBuilder to build a data
Methods on the SinkBuilder enable you to emit stream data to external systems. If the
Quality of data can be observed using assert and warn by providing expression based conditions
and messages to the whole
A corresponding
Template can be created using.toTemplate().
Parameters
| Name | Type | Description |
|---|---|---|
name | string | the name of the Sink to create |
module? | ModulePath | ModuleBuilder | - |
Returns
SinkBuilder
Remarks
See
Transform Data for a related learning module.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 })
.assert({
predicate: uri => NotEqual(uri, ''),
message: "Uri is empty"
})
.ftp({
uri: (inputs) => inputs.uri,
})
.toTemplate();
Sink
```typescript // get a predefined blob stream const file = Stream("File", BlobType);
const sink = new SinkBuilder("Ftp") .from(file) .toTemplate(); ```
from
▸ from(stream):
BlobSinkBuilder
Define the
Stream to construct the Sink from.Type parameters
| Name | Type |
|---|---|
T | extends BlobType |
Parameters
| Name | Type | Description |
|---|---|---|
stream | Stream | the input Stream for the Sink |
Returns
BlobSinkBuilder
a new
SinkBuilder