Generate Data for Column 1 depending on Column 2
MChoudhary
Posts: 1 New member
I have Column 1 - Brand , Column 2 - Device. Device can have 2 entries - Pen or Pencil and Brand can have 5 entries - A,B,C,D,E.
I want to generate data in such a way that if the SQL Data Generator tool generates Pen for Column 2,then Column 1 should have data A or B or C only and if the tool generates Pencil for Column 2,then Column 1 should have D or E only.
How can these constraints be maintained?
Thanks in advance.
I want to generate data in such a way that if the SQL Data Generator tool generates Pen for Column 2,then Column 1 should have data A or B or C only and if the tool generates Pencil for Column 2,then Column 1 should have D or E only.
How can these constraints be maintained?
Thanks in advance.
Answers
I'm assuming here your colunm is Device, and this is the appropriate mapping. I did need to add a reference to my list of Python 2.7 libraries to get the random module.