Declares transforms by name for use in policies, views, cursors, etc.
For backwards compatibility (cortex < 2.13.0), any transform not assigned a name takes on the export property of the library in which it is defined. A transform can extend require('runtime.transform').Transform or not. If it does, the transform can tweak the default limits for the each() cycle in the constructor.
@transform('test__expression_transform', {
environment: 'development',
if: { $gte: [ '$RANDOM', 0.5] }
class TestTransform {
result(data) {
return 'replaced-result'
each(object, memo, { cursor }) {
return 'replaced-each'
Copy link