Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Allow fields to reuse previously generated values #100

Open
chuck-alt-delete opened this issue Apr 26, 2023 · 0 comments
Open

Feature: Allow fields to reuse previously generated values #100

chuck-alt-delete opened this issue Apr 26, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@chuck-alt-delete
Copy link
Contributor

chuck-alt-delete commented Apr 26, 2023

It would be great if a field could reuse the generated value from another field. This currently works with parent_field and child_field to specify a foreign key relationship in _meta.relationships, but we may want to extend that to other fields as well.

For example, suppose we want a field that takes the value of another field and increases it by a random number between 5 to 10. The most general solution might be to somehow allow referencing other fields by json path? This has the benefit that it would work for nested fields as well.

Dependent fields would have to come later in the order so the upstream field has a chance to get generated first.

Related issues

For Debezium change data capture, a record has before and after fields that wrap the values before and after the record changed in the upstream database. Often we'll want to include a field that didn't change, like a primary key id. But with the current implementation, there isn't a way for one field to reference the data generated in another field.

@chuck-alt-delete chuck-alt-delete added the enhancement New feature or request label Apr 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant