Setup callback hook for base classes #246
Labels
Community-Contributed PR
flow::doing
kind/Feature
New feature or request
migrated from gitlab
stale
valuestream/SDK
Migrated from GitLab: https://gitlab.com/meltano/sdk/-/issues/247
Originally created by @rabidaudio on 2021-10-20 16:06:02
Stream
s andSink
s often need to do some setup before the EL process. For example, aSink
may need to update table schemas in the target database, aStream
may need to open a connection, etc.Users can put this stuff in constructors but I see a few problems with this:
My proposal is a simple method (
prepare
?setup
? something to that effect) with a defaultpass
implementation that is called before any messages come in/out. Perhaps also a corresponding teardown method for resources that need to be cleaned up like database connections.The text was updated successfully, but these errors were encountered: