How do I use Hooks to Filter the Stream of Data?

As mentioned in Why do we use a streaming Data approach?, sometimes we need to manipulate data as it flows in.

Use oaa hooks to insert custom logic into various stages of the data stream. This is most commonly used to modify data prior to being sent to Veza.

Enable Hooks

‘’’ … autofunction:: oaa.hooks.decorators.hook ‘’’

Here are examples of how to do this.

Steps:

  • create modules folder

  • create python logic module (e.g. modules/app_bw_hooks.py

  • hook into the event you want to listen for

  • ensure that the logic module is included in your config.yaml file