Adapter type: sybase_iq_out. The SAP Sybase IQ Output adapter reads data from Event Stream Processor and loads it into the SAP Sybase IQ database.
Before running the adapters, create a directory for the primary file location and one for the overflow file location.
The adapter writes data to SAP Sybase IQ load files in the native SAP Sybase IQ binary format, and loads these files in sequence into the database. The adapter supports persisting Event Stream Processor insert, update, and delete records. To improve performance, the data warehousing mode allows you to configure the adapter to either ignore updates and deletes, or to treat updates as inserts and ignore deletes.
The adapter creates files in the primary or overflow file locations as rows are received from Event Stream Processor. Once a file is successfully loaded into SAP Sybase IQ, the data is visible within the database and the file is removed from the file system. If an error occurs while loading a file, an error is logged to the ESP Server log, but the file remains on the file system. Once the problem preventing the load is resolved, you can manually attempt to reload the file using the SQL statement provided in the Event Stream Processor logs.
You can track the progress of this adapter using Sybase Control Center for Event Stream Processor. The file activity report shows each of the files processed by this adapter and lists its current state. To view the file activity report, you must add a special table to the database into which the adapter is loading. See Enabling File Activity Monitoring for the SAP Sybase IQ Adapter. See Viewing File Activity for the SAP Sybase IQ Output Adapter in the SCC for Event Stream Processor online help for additional information on the file activity report.
The adapter also supports schema discovery and permutations. Permutations allow mapping between a compatible Event Stream Processor schema and a database schema when the two schemas are not identical. If a permutation does not provide a mapping for a database column, that database column must be nullable. If the column is nullable, the adapter inserts NULL for each row into this column.
The default character set of the SAP Sybase IQ database must be either ASCII (if no international characters are to be loaded) or UTF-8.
If you use the CCL ATTACH ADAPTER statement to attach an adapter, you must supply the adapter type.
<Service Name="IQ" Type="DB"> <Parameter Name="DriverLibrary">esp_db_odbc_lib</Parameter> <Parameter Name="DSN"><DataSourceName></Parameter> <Parameter Name="User">DBA</Parameter> <Parameter Name="Password">sql</Parameter> </Service>
Property Label | Description |
---|---|
DB Service Name |
Property ID: service Type: string (Required for adapter operation and schema discovery) The name of the database service that represents the IQ database into which information will be loaded. Specify service entries in the Event Stream Processor service.xml file. You must specify an ODBC service for the database service. See the Administrators Guide. No default value. |
Target DB Table Name |
Property ID: table Type: string (Required for adapter operation; optional only if you are using schema discovery) A string value representing the name of the table in SAP Sybase IQ into which you wish to load data. No default value. |
Include Base Content |
Property ID: outputBase Type: boolean (Optional) Determines whether to process the base data of the window or stream to which the adapter is connected. The adapter processes the base data of the window or stream to which it is attached. Default value is false. |
Primary File Location |
Property ID: primaryFileLocation Type: directory (Required for adapter operation; optional only if you are using schema discovery) Specify the directory in which SAP Sybase IQ load files are stored temporarily until they are loaded into the system. If this directory does not exist, create it before running the adapter. Because there is sensitive information being loaded into the SAP Sybase IQ database and anyone with access to the load files can change the data being loaded, you must secure this directory as you do your database. SAP recommends that only users with access to the database have access to this directory. No default value. |
Overflow File Location |
Property ID: overflowFileLocation Type: directory (Optional) Specify the directory for overflow files. If this directory does not exist, create it before running the adapter. If the primary file location does not contain enough space to write out load files, the files are created in the overflow location. Because there is sensitive information being loaded into the SAP Sybase IQ database and anyone with access to these files can change the data being loaded, you must secure this directory as you do your database. SAP recommends that only users with access to the database have access to this directory. No default value. |
Field Mapping |
Property ID: permutation Type: permutation (Advanced) The permutation list maps the Event Stream Processor column names to the database schema column names in the specified table. If you do not specify a permutation, ensure that the Event Stream Processor stream or window columns exactly match the database schema of the destination table. For example, both must have the same order, same number of columns, and compatible datatypes. If the Data Warehouse Mode property is OFF, and you want to specify a permutation, include a mapping for at least one column of the primary key of the ESP window attached to the adapter. Without mapping at least one primary key column, the adapter fails to start. The format for this property is: <esp_columnname>=<database_columnname>:<esp_columnname>=<database_columnname> Use a colon to separate mappings. No default value. |
Only Base Content |
Property ID: onlyBase Type: boolean (Advanced) If true, the adapter processes only the base data of the window or stream to which it is attached. No further message flow is processed. Default value is false. |
Recover Only |
Property ID: recoverOnly Type: boolean (Advanced) If true, the adapter processes any files that have beencreated, but not loaded, by a previous instance of the adapter. After these files are processed, the adapter does not process further message flow. Default value is false. |
Data Warehouse Mode |
Property ID: dataWarehouseMode Type: choice (Advanced) Specifies the
type of data warehousing mode the adapter uses. Valid values are:
|
Timestamp Column Name |
Property ID: timestampColumnName Type: string (Advanced) If a column name is provided, the time at which the record is written to the load file is stored in that column of the database record. If this property is empty, no timestamp is stored. The timestamp is always provided in UTC. No default value. |
Target File Size |
Property ID: targetFileSize Type: uint (in MB) (Advanced) Specifies the maximum size for an SAP Sybase IQ load file before it is loaded into SAP Sybase IQ. SAP Sybase IQ load performance is better for larger files, but latency increases with file size. Default value is 2000. Each SAP Sybase IQ load file is not necessarily this size. If the adapter is not in data warehousing mode, any updates or deletes received reduce the file size. The Idle Buffer Write Delay and Buffer Age Limit parameters may also cause smaller files to be generated. |
Idle Buffer Write Delay |
Property ID: idleBufferWriteDelay Type: uint (in seconds) (Advanced) If the adapter has not received a row during the number of seconds specified, the previously created file is loaded. This provides latency control in situations where message flow may be sporadic. Default value is 10. |
Buffer Age Limit |
Property ID: bufferAgeLimit Type: uint (Advanced) The maximum amount of time (in seconds) between the first and last record in an I/O buffer. This ensures that consistent but low volume message flow does not create very high latency. Default value is 600. |
Disable Referential Integrity |
Property ID: disableReferentialIntegrity Type: boolean (Advanced) Disables the referential integrity constraints on the table before the loading operation is performed. This can significantly improve performance of the load, but causes problems if the source does not maintain data integrity. Default value is false. |
I/O Buffer Size |
Property ID: ioBufferSizeMB Type: uint (in MB) (Advanced) Determines how much data is buffered in memory before it is written to disk. Increasing this value may increase write performance, but may also increase latency. Determine the amount of memory required by the adapter to buffer by multiplying this number by the number of I/O buffers. The target file size should be a multiple of this number. Default value is 20. |
Number of I/O Buffers |
Property ID: numIOBuffers Type: uint (in MB) (Advanced) The number of data buffers to maintain. This number should be sufficiently high so that a buffer is always available to write into. The slower the file system, the more I/O buffers required. Default value is 5. |
PropertySet |
Property ID: propertyset Type: string (Advanced) Specifies the name of the property set. Property sets are reusable sets of properties that are stored in the project configuration file. Using these sets allows you to move adapter configuration properties out of the CCL file and into the CCR file. If you specify the same properties in the project configuration file and the ATTACH ADAPTER statement, the values in the property set override the values defined in the ATTACH ADAPTER statement. No default value. |
Timezone For Statistics |
Property ID: timezoneForStats Type: string (Advanced) Controls the time zone in which midnight statistics for the adapter roll over. For example, if the adapter is left at its default value of GMT, midnight statistics reset at midnight GMT. This setting does not affect any other dates processed or returned by this adapter. Default value is GMT. |
The SAP Sybase IQ Output adapter maintains custom statistics to show its status and to track its loading activities. Enable the time granularity option in the project configuration (ccr) file to get these statistics reported by the _ESP_Adapter_Statistics metadata stream. This option helps determine how often the ESP Server gathers statistics.
Rows | Bytes | Average Rows Received/Loaded |
---|---|---|
|
|
|
* A row is skipped when the opcode does not match the adapter's current warehousing mode. For example, if the data warehousing mode is INSERTONLY, and the adapter passes in a delete or an update, this results in a skipped row.
The "since midnight" statistics reset after midnight in the time zone specified by the timezoneForStats adapter property. If no value is set, the default behavior is reset at midnight GMT.