Skip to content

Latest commit

 

History

History
18 lines (13 loc) · 765 Bytes

context_object.md

File metadata and controls

18 lines (13 loc) · 765 Bytes

The Context Object

Many of the methods in the Stream class and its subclasses accept a context parameter, which is a dictionary that contains information about the stream partition or parent stream.

Best practices for using context

  • The context object MUST NOT contain any sensitive information, such as API keys or secrets. This is because the context is

    1. sent to the target,
    2. stored in the state file and
    3. logged to the console as a tag in metrics and logs.

  • The context object SHOULD NOT be mutated during the stream's lifecycle. This is because the context is stored in the state file, and mutating it will cause the state file to be inconsistent with the actual state of the stream.