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
modulesfoldercreate python logic module (e.g.
modules/app_bw_hooks.pyhook into the event you want to listen for
ensure that the logic module is included in your
config.yamlfile