StreamLoader

interface StreamLoader

Implementor interface. A stream event handler.

start is called once before any records are processed.

close is called once after all records have been processed, regardless of success or failure, but only if start returned successfully. If any exception was thrown during processing, it is passed as an argument to close. hadNonzeroRecords is only used by legacy typing and deduping and streamFailure is only used as a boolean flag - it's internal exception is not read.

teardown provides a simpler API for calling close, which itself is used by existing destinations to perform finalization and clean up of temporary tables, etc.

Inheritors

Properties

Link copied to clipboard

Functions

Link copied to clipboard
open suspend fun close(hadNonzeroRecords: Boolean, streamFailure: StreamProcessingFailed? = null)
Link copied to clipboard
open suspend fun start()
Link copied to clipboard
open suspend fun teardown(completedSuccessfully: Boolean)