shuttle-hq / synth

The Declarative Data Generator
https://www.getsynth.com/
Apache License 2.0
1.39k stars 110 forks source link

[Feature Request]: Calculated/Formula Fields #236

Open YLukashina opened 3 years ago

YLukashina commented 3 years ago

Required Functionality It should be possible to perform (at least) simple algebraic actions on fields, for instance, multiply a field by a constant number or another field.

Proposed Solution

Use case This can help to take into account possible dependencies between fields and spares users time since they do not have to calculate additional fields later in a different tool, especially in the case of big amounts of data. Example: sales data with transactions, prices, and revenue. Revenue must be equal to transactions multiplied by prices.

christos-h commented 3 years ago

Hey! Great idea @YLukashina :)

We can use something like evalexpr wrapped up in something like our format generator to do this.

YLukashina commented 3 years ago

Hey, @christoshadjiaslanis , I am not working in this language, hence I cannot evaluate your suggestion, unfortunately. But I guess evalexpr would be a good idea!

YLukashina commented 3 years ago

I

Hey! Great idea @YLukashina :)

We can use something like evalexpr wrapped up in something like our format generator to do this.

I think it could look like an Excel formula inside the format generator.