Description

The SQLFileUpdateReceiver creates a file with standard ANSI SQL update statements.


In This Article


Receiver Parameters

The following parameters can be defined for the SQLFileUpdateReceiver. Items with an asterisk (*) are required. 

  • path* - Defines the directory path where to store the output file.
  • fileName* - Defines the name of the file the SQL statement will output to (i.e., where update statements will be written).
  • subDir - Defines an optional sub-directory where to store the output file.
  • rowDelimiter* - Defines the characters to delimit each row.



Data

The Update statement can be defined for the SQLFileUpdateReceiver. 



Note: In the Update statement above, we replaced the actual values with strings like var1 and var2. Mapping of these variable strings to attributes in the Domain is done in the Receiver Attribute Property Keys. 


Receiver Attribute Property Keys

The Receiver defines one property key that can be modified on any of its associated Domain Attributes.

  • variable - Defines the variable string to be mapped to the attribute


In the example below, we mapped the id attribute to var2 and the username to var1. This matches the Update statement above in the Data section. When the Scenario is run, the var1 string will be replaced with data generated in the username Attribute, and the var2 string will be replaced with data generated in the id attribute. 




Row Delimiter

There are two rowDelimiter types:

  • UNIX/Linux/Mac-LF - Used for Mac, Unix & Linux machines.
  • Windows-CR/LF - Used for Windows machines.


Example Output

The following is an example output of SQL update statements into a Customer table.


UPDATE Customer 
SET username = "userUpdate100000"
WHERE customerId = 100000;
UPDATE Customer 
SET username = "userUpdate100001"
WHERE customerId = 100001;
UPDATE Customer 
SET username = "userUpdate100002"
WHERE customerId = 100002;
UPDATE Customer 
SET username = "userUpdate100003"
WHERE customerId = 100003;
UPDATE Customer 
SET username = "userUpdate100004"
WHERE customerId = 100004;
UPDATE Customer 
SET username = "userUpdate100005"
WHERE customerId = 100005;