Effect CommunityEC
Effect Community2y ago
11 replies
bsluther

Confusion with Transforms and Computed Fields in TemporalClient Schema

I'm trying to figure out how to do transforms correctly and I'm a bit confused. I have a database table described the TemporalTable schema, and I want to add a computed field to the TemporalClient schema. The TemporalTable uses branded types. When I transform, I can add a field as expected in the decode function. From what i gather though, the encode so is going from the TemporalClient's input, which strips away the brands.

Is this things working exactly as you'd hope and I'm missing the point? Or is there some other way to define "one more step", eg unknown -> TemporalTable -> TemporalClient without introducing the additional step of unknown -> TemporalTable -> TemporalClientInput -> TemporalClient? Can I somehow make the input of TemporalClient be TemporalTable?
Was this page helpful?