Skip to content

Tap Checkly

Singer transform module

This module handles all transforms from api objects into singer objects.

Arch

By design this module is:

  • independent of the api module
  • agnostic of the etl state objects.

Exports

  • SingerStreams: the names of the singer streams that are generated by this module
  • ObjEncoder: the main interface from which the transform is defined
  • ObjsEncoders: namespace where all supported ObjEncoder are found

How to implement a new transform?

  1. Extend SingerStreams for the new obj encoder
  2. Create a private module within this module
  3. In the private module: implement an ObjEncoder[_T] for the new specific object (_T) using the new SingerStreams item
  4. Expose the new encoder in ObjsEncoders

When to extend this module streams/encoders?

There is only one SingerStreams item per object schema, if two streams share the same schema they are equivalent as so their encoders. This also implies that objects _T and _R would be equivalent, but if this is not the case its better to reuse the equivalent encoder and then override the stream by another SingerStreams item.