Description

The GMapGenericSQLInsertReceiver works is a combination of the GenericSQLInserV2Receiver and the GMapPutReceiver to send generated to a SQL database and key/value data to a G-MapServer.


Like the GenericSQLInsertV2Receiver, it inserts a Domain's generated data directly into a database table via JDBC prepared statements. And, like the GMapPutReceiver, it sends baches of Key-Values/Data-Values to a G-MapServer. The Key-Values are from the Domain's primary Attribute generated value, and the Data-Value are from the returned values generated from the actual database.


Component Diagram

The component diagram below shows how the GMapGenericSQLInsertReceiver interacts with generated Key-Values and generated Data-Values returned from the database. 


Note: The Key-Values should normally be generated by a RangeGen Generator or a similar generator because it creates an increasing pattern of data. Any child Domain can generate the same pattern of data to retrieve Data-Values mapped to Key-Values created by the pattern.



Parameters

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

  • resourceName* - Defines the name of the resource that contains the database connection information on a user's local machine.
  • databaseName* - Defines the name of the database to access.
  • tableName* - Defines the name of the database table to insert rows into.
  • uniqueAttribute - Defines a Domain Attribute the Receiver will use to identify a unique value that has already been inserted into the table to prevent duplicate data entry where a unique constraint is required.
  • truncate* - Truncates the table before inserting rows by executing a 'delete from table' statement.
  • statementSeparator* - Defines when a SQL statement has ended.
  • booleanValue* - Format a Boolean object with the selected mask.
  • rowDelimiter* - Defines the bytes that delimit each row.
  • nullValue* - Represents Null value.
  • quoteTextData* - Defines the character to use when quoting text data
  • escapeCharForIndentifiers - Escape character is used to wrap identifiers: schema name, table name, and column name. The parameter is useful when identifiers contain special characters like ?, ', ", etc.
  • ignoreDBName - By default, ignoreDBName is set to False which appends the database name in the insert query. In order to not to have database name appended in the insert query, set the ignoreDBName to True. 
  • configPath* - Defines the base path where a configuration file contains the REST URL and port for connecting to a G-MapServer.
  • configSubDir - Defines an optional subdirectory where a configuration file contains the REST URL and port for connecting to a G-MapServer.
  • configName* - Defines the name of the configuration file that contains the REST URL and port for connecting to a G-MapServer.
  • namespace* - Defines the namespace within a G-MapServer to store key/value data.
  • resetAction* - Defines if, when, and how a G-MapServer resets its' internal cache. The options are the following:
    • NoAction
    • ResetNamespaceOnStartup
    • ResetNamespaceOnShutdown
    • ResetCacheOnStartup
    • ResetCacheOnShutdown

Example