Remember, before we can learn how to perform synthetic data replacement on sensitive column data within the three database tables, we must first initialize all three table by inserting 50000 rows of test data into each table.
This lesson walks through the steps to create and run Scenarios which will insert 50000 rows of data into each of the three database tables.
Step 1 - Create a Scenario
- On the Project Dashboard, go to the Scenarios panel and click the New Scenario button.
Step 2 - Name your Scenario
- Set the Name parameter to UserInsert
- Click the Next button
Step 3 - Define a Primary Domain
All Scenarios must have a Domain defined before it can be downloaded and executed. In a Scenario, the Primary Domain is the Domain whose Receivers are enabled for morphing the generated test data into some useable format. All other Domains within a Scenario are in support of how many of rows of data the Primary Domain will generate.
- Click the Create With Primary Domain button
Step 4 - Select a Primary Domain
- Click the User Domain's radio button
- Click the Next button
Step 5 - Select which Receivers are Used in the Scenario
Only the GenericSQLInsertReceiver is needed to insert data into a database table.
- Click the GenericSQLInsertReceiver's check box
- Click the Continue button
Step 6 - Ignore Referential Relationships
In the Insert Scenarios, we only need to one Domain to insert data into one table with no referential relationships; we also have no need for the Master Domain.
- Click the No button
Step 7 - Manually Build the Scenario
Since we need only one Domain and have no need to reference any other Domain for this Scenario, the Scenario Wizard, that automatically does the work of creating references between Domains, is not needed.
- Click the No Button
- After clicking No button, the Scenario will be created, and the Scenario Dashboard will appear.
Step 8 - Modify the Variable Set
For the insert Scenarios, we want to use the Variable Set, InsertSet, so that each insert Scenario will populate 50000 rows of data into their respective database tables.
- Click the Variable Set pull-down menu
- Select and click the InsertSet menu option
- After clicking the InsertSet menu option, the Scenario Summary should read, 50000 users.
Step 9 - Download Scenario
You are now ready to download your insert Scenario to your local computer where it can be executed by the GenRocket command line interface.
- Click the Download button
Step 10 - Run your Scenario
Normally downloads go to to your download directory; make sure you know where you downloaded your Scenario.
- On your local computer, bring up a command line terminal
- Change to the folder where you downloaded the Scenario
- At the command prompt, type the following command and press the Enter key on your key board
- genrocket -r UserInsertScenario.grs
- If all goes well, you should see the following similar output
- Note: Runtime, Generator, and Receiver versions may have changed since the creation of this article.
> ~/Downloads: genrocket -r UserScenario.grs License validated GenRocket Runtime Version: 3.5.6 GenRocket Generator Runtime Version: 22.214.171.124 GenRocket Receiver Runtime Version: 126.96.36.199 Validating the Scenario Checksum for Integrity. Starting Engine... Running Scenario UserInsertScenario... Preparing Statement: insert into alpha.user(id,external_id,first_name,last_name,middle_initial,username,ssn,password,activation_date) values (?,?,?,?,?,?,?,?,?) Insert Count = 10000... Insert Count = 20000... Insert Count = 30000... Insert Count = 40000... Insert Count = 50000... All done! Time elapsed: 0m:15s
You should have 50000 rows of data in your user table
Step 11 - Create GrantHistoryInsert Scenario
- Repeat steps 1 through 10 for the GrantHistory Domain
Step 12 - Create NotificationSettingInsert Scenario
- Repeat steps 1 through 10 for the NotificationSetting Domain