Open jasondamour opened 1 week ago
hey @jasondamour have you checked out our [GenerateCategorical(https://docs.neosync.dev/transformers/system#generate-categorical) Transformer? This transformer randomly selects a value from a list of comma separated values that the user providers.
Or where you were looking for something different?
@evisdrenova I am sadly just getting familiar with MySQL, but could the list of values come from the table schema itself?
I'm trying to avoid code duplication, maintaining a list of values both in our schema and in neosync seems avoidable
@jasondamour That makes sense, unfortunately we don't support that today (hence the enhancement :)). We can certainly look into it and add it to the roadmap. Today, you can use the GenerateCategorial or write a custom javascript transformer using the Generate (Transform) Javascript transformer. Otherwise, if you're not concerned with anonymizing it, you can just pass the value through from the source -> destination using the Passthrough Transformer.
Describe the solution you'd like
Offer a built-in transformer for Enums, which selects a random valid enum value.
Describe alternatives you've considered
Defining a custom transformer to select a random value from enum
Requires lots of code duplication
Additional context
Thank you for your feature request – we love each and every one!