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 moduleObjEncoder
: the main interface from which the transform is definedObjsEncoders
: namespace where all supportedObjEncoder
are found
How to implement a new transform?
- Extend
SingerStreams
for the new obj encoder - Create a private module within this module
- In the private module: implement an
ObjEncoder[_T]
for the new specific object (_T
) using the newSingerStreams
item - 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.