Description

The SQLUpdateV2Receiver can be assigned to a Domain and used to create a database table (e.g., Oracle, MySQL, etc.). 


In This Article


Step 1 - Assign the SQLUpdateV2Receiver to the Domain

Assign the SQLUpdateV2Receiver to the Domain that requires table creation. In this example, it has been assigned to a User Domain.


NOTE: For information on assigning a Receiver to a Domain, click here.


Step 2 - Create a Configuration File

This Receiver uses a configuration file located on the user's local computer as a resource to attain the necessary information for connecting to a user's local database via JDBC. 


Below is an example of a JDBC configuration file defined to connect to a MySQL database called acme. It has been named config.properties.


driver=com.mysql.jdbc.Driver 
user=root password=openSaysMe 
url=jdbc:mysql://localhost:3306/acme 
batchCount=1000


NOTE: More details can be found within the SQLUpdateV2Receiver article.


Step 3 - Update the Receiver Parameters

The Receiver parameters must be updated to reflect your Resource Path and Name. For this example, the config.properties file exists in the path defined for the user's resource.jdbc.directory Organization Resource.



Step 4 - Add the Create Table Syntax to the Receiver's Data Tab

Select the Data tab and add the create table syntax. Remember to save the change once finished! 

A MySQL example is shown below:



IMPORTANT: Make sure to use the create table syntax that matches the database table you are creating.


Step 5 - Download and Run the Scenario

The SQLUpdateV2Receiver will create the table when the Scenario is run from a command line. This can be done in several ways depending on which features are used within the GenRocket platform.

A Scenario, Scenario Chain, or Scenario Chain Set can be run using the command below. 

genrocket -r <ScenarioName.grs>


NOTE: For more information about this specific Receiver, see How do I use the SQLUpdateV2Receiver?