Description
The PostgreSQLPartitionReceiver creates one or more InFile descriptions and one or more InFiles containing the generated data.
This Receiver is meant to be used in Scenarios that are run by the GenRocket GPartition engine to generate huge amounts of data; thus, this parameter will automatically be set by the GPartition engine.
Note: To learn more about the GenRocket GPartition engine, click here.
In This Article
Receiver Parameters
The following parameters can be defined for the PostgreSQLPartitionReceiver. Items with an asterisk (*) are required:
- outputPath* -Defines the path where the InFile descriptions and data files will be created.
- outputSubDir - Defines an optional sub-directory under the outputPath where generated data will be stored.
- resourcePath* - Defines the path where the resource file for JDBC connection properties exists.
- resourceSubDir - Defines an optional sub-directory under the resourcePath where the resource file for JDBC connection properties exists.
- resourceName* - Defines the name of the resource that contains the database connection information on a user's local machine.
- tableName* - Defines the name of the database table that will be loaded via one or more InFiles.
- fieldTerminator* - Determines how each data field within the InFile data will be terminated (Tab or Comma).
- lineTerminator* -Defines how each data row within the InFile data file will be terminated.
- filesPerDirectory* - Defines the number of files that will be created in each directory.
- recordsPerFile* - Defines the number of records that will be stored in each file.
- executeinFile* - Defines whether each InFile should be executed after all InFiles have been generated.
- serverNumber* - Defines the server instance number where the Receiver will be running and helps the Receiver determine the output directory structure where it will deposit the generated data files. This Receiver is meant to be used in Scenarios that are run by the GenRocket GPartition engine to generate huge amounts of data; thus, this parameter will automatically be set by the G-Partition engine.
- instanceNumber* - Defines the runtime instance number on a given server instance where the Receiver will be running and helps the Receiver determine the output directory structure where it will deposit the generated data files. This Receiver is meant to be used in Scenarios that are run by the GenRocket GPartition engine to generate huge amounts of data; thus, this parameter will automatically be set by the G-Partition engine.
- sqlInsert - Determines when the receiver should output SQL. The default value is 'False'. When 'True', the created bulk file will be converted to an ANSI SQL insert file for data insertion.
- databaseName - Defines the name of the database. A name should be given when the sqlInsert parameter is set to 'True'. The default value is 'n/a'.
- textQuoteType* - Defines the character to use when quoting text data. Options are CData, Single, or Double.
- escapeCharacter* - Used to form an escape sequence for all the special characters. The default value is a backslash (\).
- batchCount* - Defines the number of insert statements written to file for each batch.
- nullValue* - Defines the value for null. The default value is (null).
Receiver Attribute Property Keys
The Receiver defines two property keys that can be modified on any of its associated Domain Attributes:
- columnName - Specifies the table column name as it is in the actual database (e.g., first_name, last_name).
- include - Determines if the Attribute will be included in the InFile data dump.
- useQuotes - Determines if a value should be quoted. Sometimes a numeric value should be quoted (e.g., SSN). The default value is 'True'.
ANSI SQL Insert File Conversion Parameters
The PostgreSQLPartitionReceiver has six parameters that you can configure to create ANSI SQL Insert files for data insertion. This is helpful in environments where direct insertion over JDBC is not permitted. Please note that the image below contains example values, and yours may be different.