finos / datahelix

The DataHelix generator allows you to quickly create data, based on a JSON profile that defines fields and the relationships between them, for the purpose of testing and validation
https://finos.github.io/datahelix/
Apache License 2.0
141 stars 50 forks source link

Nested JSON #1683

Open ssabnis opened 4 years ago

ssabnis commented 4 years ago

Feature request

Great utility, Does tool support the Nested JSON to simulate for example EMPLOYEE, DEPT relations. Where I can have same key generated for EMP and DEPT structures. And limit the Nested EMP to be max 10 rows.

tjohnson-scottlogic commented 4 years ago

Hi @ssabnis, thanks for the interest :) You could use nested JSON to model EMPLOYEE, DEPT. I've done an example:

and ran via:

[tim@sn1 bin]$ ./datahelix --max-rows=3 --replace --profile-file=profiles/departments.txt --output-format=json --quiet --output-path=.txt

to get: out.txt

Would this work for your purposes? Or are you looking to use with SQL?