std.lib.transform.apply

process-transform

added in 3.0

(process-transform strans tdata nsv interim tsch datasource)

Converts one value to another either through a value or function

(transform/process-transform {:name “Bob”} {:name “Chris”} :account {} {} {}) => {:name “Bob”}

wrap-hash-set

added in 3.0

(wrap-hash-set f)

allows operations to be performed on sets

((transform/wrap-hash-set +) #{1 2 3} 10) => #{13 12 11}

((transform/wrap-hash-set +) 1 10) => 11

wrap-model-post-transform

added in 3.0

(wrap-model-post-transform f)

applies a function transformation in the :post-transform step

(graph/normalise {:account/name “Chris”} {:schema (schema/schema examples/account-name-age-sex) :name “Bob” :pipeline {:post-transform {:account {:name (fn _ env(:name env))}}}} {:normalise transform/wrap-model-post-transform}) => {:account {:name “Bob”}}

wrap-model-pre-transform

added in 3.0

(wrap-model-pre-transform f)

Applies a function transformation in the :pre-transform step

(graph/normalise {:account/name “Chris”} {:schema (schema/schema examples/account-name-age-sex) :pipeline {:pre-transform {:account {:name “Bob”}}}} {:normalise transform/wrap-model-pre-transform}) => {:account {:name “Bob”}}