Flat data generation with repeating fields #378

Open
ashekthegreat opened this Issue Apr 26, 2016 · 1 comment

Projects

None yet

2 participants

@ashekthegreat

This application has great code and superb architecture. Kudos!

Now, I need your suggestion about how to implement repeating fields. I want to generate flat data with couple of fields repeating from 1 or more times. Fir example:

Name - Age - Exam - Mark
John - 32 - CSE - 89
John - 32 - IPE - 72
Robin - 24 - MAT - 67
Sally - 29 - CSE - 90
Sally - 29 - BAN - 56
Sally - 29 - CHE - 95

You got the idea. Here Name and Age are repeating fields and Exam, Mark are related fields. One Name-Age is being repeated for multiple Exam-Mark combinations. How should I implement such feature?

@benkeen
Owner
benkeen commented May 26, 2016

Hi @ashekthegreat, thanks! :) Wish I had more time to devote to it, but c'est la vie!

Hmm... tricky one. There isn't really a way to do this right now. This is far from ideal, but I guess you can use the Constants data type for this. That has the option to add a "loop count" which outputs a constant value for N rows, see screenshot:

screen shot 2016-05-25 at 6 51 26 pm

That would output 10 rows of John, 32 and then 10 rows of Mary, 36. Any other data types you enter in the table would just be generated randomly for each row.

Limitations are:

  • it's not random! You'd have to manually enter all those values, which could be a royal pill if you have a lot to generate.
  • Also, you couldn't have 10 rows of one name, then 5 rows of another, then 8 of another etc. etc. - it would always be fixed to N chunks each time.
  • Also also, if you generated > 20 rows in the above example, it would generate more John, 32 lines again.

So no, not great.

Unfortunately there's really nothing in there right now to allow you to configure something like this for arbitrary rows - it would need an entire new UI component to allow such a feature to be added.

Sorry... definitely something for version 4 of the script. :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment