Adapter properties and commands

This section lists the properties and commands supported by the adapter.

Dialect

Specifies the Actian database type (dialect) to which to connect. The supported values are Vector, Avalanche, and Ingres. The default value is Vector.

The corresponding adapter command is -DIA dialect (or -DIALECT dialect).

Use URL

Specifies whether to use the direct URL string provided by the user to establish the connection. If not enabled, the adapter automatically assembles the connection URL behind the scenes using the other connection properties, most notably Host, Port and Database.

URL

Specifies the connection URL the adapter uses to establish connection to the database. For the Vector, Avalanche, and Ingres database types (dialects), the URL values must start with the jdbc:ingres:// or jdbc:actian:// prefix. This is a mandatory property.

The corresponding adapter command is -URL url.

Host

Specifies the host name where the Actian database is installed and running. This is a valid DNS name of the host or its IP address. This is a mandatory property.

The corresponding adapter command is -H host (or -HOST host).

Port

Specifies the port on which the Actian database is listening for connections from clients such as the Actian adapter. The default value is VW7 which represents the port 27839. This is a mandatory property.

The corresponding adapter command is -P port (or -PORT port).

Database

Specifies the name of the database on the database server to which to connect. This is a mandatory property. The corresponding adapter command is -DB database (or -DATABASE database).

User

Specifies the username to use for the authentication when connecting to the Actian database server. The corresponding adapter command is -USR username (or -USERNAME username).

Password

Specifies the password to use for the authentication when connecting to the Actian database. The corresponding adapter command is -PWD password (or -PASSWORD password).

Autocommit

Specifies whether the driver should immediately commit the statements it is executing, outside of any transaction scopes defined for the adapter. The default value is Default, which matches the default autocommit value defined by the driver. The value Default is used to let the driver choose whether to autocommit the transactions or not. The mode chosen is captured in the adapter log. The value On forces the autocommit mode, and the value Off prevents the autocommit mode, and the transactions are committed or rolled back by the adapter based on the Transaction Scope and Failure Action property values. The default value is Default. The corresponding command line values are default, on and off.

The corresponding adapter command is -AC autocommit (or -AUTCOMMIT autocommit).

Write Mode

Specifies the mode of write operation to perform on the target table. The corresponding adapter command is -WM mode (or -WRITEMODE mode).

The following modes are supported:
  • Insert: Insert each input row to the target table. The corresponding command line value is insert.
  • Update: Perform update operation for each input row based on the primary key detected in the table. If there is a match, the matching row in the target table is updated. If there is no match, the target table is not affected. The corresponding command line value is update.
  • Delete: Perform delete operation for each input row based on the primary key detected in the table. If there is a match, the matching row in the target table is deleted. If there is no match, the target table is not affected. The corresponding command line value is delete.
  • Insert First: Perform insert operation for each input row based on the primary key detected in the table. If the operation fails due to primary key constraint violation, the adapter performs update operation on the row, and it is updated with the values from the input row. If the insert operation succeeds, the new rows is added to the table and no follow-up update is needed. The corresponding command line value is insert_first.
  • Update First: Perform update operation for each input row based on the primary key detected in the table. If the operation reports that no rows were updated, the adapter performs insert operation on the row, and a new row is added to the table with the values from the input row. If the update operation succeeds, the row in the table is updated with the input row values and no follow-up insert is needed. The corresponding command line value is update_first.
Schema

Specifies the name of the schema containing the table on which to perform read or write operations resides. Click on the Fetch button when configuring this property in the web UI to obtain the list of available schemas and select a schema from the list. You can also type the name of the schema manually.

The corresponding adapter command is -SCH_name_ (or -SCHEMA name).

Table

Specifies the name of the table on which to perform read or write operations. Click on the Fetch button when configuring this property in the web UI to obtain the list of available tables and select a table from the list. You can also type the name of the table manually.

The corresponding adapter command is -TBL_name_ ( or -TABLE name).

Query

Specifies the text of the SELECT statement to run to fetch rows from the database. When Table property is set for the read operation, the SELECT statement is automatically generated by the adapter. This property provides a way to specify custom SELECT statement to execute instead.

The corresponding adapter command is -QRY query (or -QUERY query).

DML

Specifies the custom Data Manipulation Language (DML) statement to execute for each input row passed to the adapter. Use question marks to represent bind parameters for the statement. The number of bind parameters must match the number of fields present in each input row. The adapter binds the parameters in the order of fields on input.

The corresponding adapter command is -DML dml.

Procedure

Specifies the name of the stored procedure to executed for each input row passed to the adapter. The number of IN and INOUT parameters in the procedure is expected match the number of fields in each input row. The adapter binds the parameters in the order of fields on input. Any outputs produced by the procedure, such as values for any INOUT or OUT parameters, or the stored procedure return value, are ignored.

The corresponding adapter command is -PROC name (or -PROCEDURE name).

Turncate

Specifies the switch whether to truncate the target table before performing write operations on it. The default value is false. It is only enabled for Insert and Insert First write modes.

The corresponding adapter command is -TRUNC (or -TRUNCATE).

Pre SQL

Specifies the one or more SQL statements to execute on the database BEFORE performing read and write operations on the database. If the multiple statements are specified, they must be separated by a semicolon character. No newlines are allowed. The statements must be static statements, they must not have any bind parameters (question mark placeholders).

The corresponding adapter command is -PRESQL sql.

Post SQL

Specifies the one or more SQL statements to execute on the database AFTER performing read and write operations on the database. If multiple statements are specified, they must be separated by a semicolon character. No newlines are allowed. The statements must be static statements, they must not have any bind parameters (question mark placeholders).

The corresponding adapter command is -POSTSQL sql.

Date Format

Specifies the custom date format to assume for the input date values when performing write operations on the database, and format to use for the output date values when performing read operations on the database. The default is to use JDBC default format yyyy-mm-dd, so four digits for the year, followed by a dash, followed by two digits for the month, followed by a dash, followed by two digits for the day. If a custom format is specified, it must follow the syntax defined by the java.text.SimpleDateFormat Java class, which is part of the standard Java SDK. Refer to the Java SDK documentation for details. If the underlying schema (type tree) type for the field is an item of Date & Time subclass, the Format attribute of the item must be compatible with the specified Date Format property value.

The corresponding adapter command is -DF format (or -DATEFORMAT format).

Time Format

Specifies the custom time format to assume for the input time values when performing write operations on the database, and format to use for the output time values when performing read operations on the database. The default is to use JDBC default format hh:mm:ss, so two digits for the hours, followed by a period, followed by two digits for the minutes, followed by a period, followed by two digits for the seconds. If a custom format is specified, it must follow the syntax defined by the java.text.SimpleDateFormat Java class, which is part of the standard Java SDK. Refer to the Java SDK documentation for details. If the underlying schema (type tree) type for the field is an item of Date & Time subclass, the Format attribute of the item must be compatible with the specified Time Format property value.

The corresponding adapter command is -TF format (or -TIMEFORMAT format).

Timestamp Format

Specifies the custom timestamp format to assume for the input timestamp values when performing write operations on the database, and format to use for the output timestamp values when performing read operations on the database. The default is to use JDBC default format yyyy-mm-dd hh:mm:ss[.fff...], so four digits for the year, followed by a dash, followed by two digits for the month, followed by a dash, followed by two digits for the day, followed by a space, followed by two digits for the hours, followed by a period, followed by two digits for the minutes, followed by a period, followed by two digits for the seconds, followed by an optional period and fractions of a second. If a custom format is specified, it must follow the syntax defined by the java.text.SimpleDateFormat Java class, which is part of the standard Java SDK. Refer to the Java SDK documentation for details. If the underlying schema (type tree) type for the field is an item of Date & Time subclass, the Format attribute of the item must be compatible with the specified Timestamp Format property value.

The corresponding adapter command is -TSF format (or -TIMESTAMPFORMAT format).

Row Limit

Specifies the maximum number of rows to return when performing read operation on the database. If the table or query from which the adapter reads data has more rows than the limit specified in this property, the adapter stops returning the rows after the limit is reached. The default value for this property is 0, which means unlimited, so all available rows are returned.

The corresponding adapter command is -RL limit (or -ROWLIMIT limit).

Fetch Size

Specifies the number of rows to fetch from the database per network call. The adapter provides this value to the driver as a hint. The driver is free to ignore the value and apply its own internal logic to determine the optional value to use. The default value for this property is 0, which instructs the adapter to leave the decision to the driver and not to provide any hints.

The corresponding adapter command is -FS size (or -FETCHSIZE size).

Batch Size

Specifies the number of rows for the adapter to buffer and send to the database at once when performing write operation on the database. The default value is 1, which means the adapter sends each input row to the database separately.

The corresponding adapter command is -BS size (or -BATCHSIZE size).

Logging

Specifies the level of logging to use for the log (trace) file produced by the adapter.

The value Information means log informational messages, the value Errors Only means log error messages only, and the value Verbose means log debug and trace level messages along with the informational and error messages.

The corresponding adapter command is:

-T[V|E][+] [log_file]

-T -> Log adapter informational messages.

-TE -> Log only adapter errors.

-TV -> Use verbose (debug) logging. The log file records all activity that occurs while the adapter is producing or consuming messages.

+ -> Appends the trace information to the existing log file. Omit this argument to create a new log file.

log_file -> Specifies the location of the log file to which to write log messages. If not specified, the default log file name p4actian.mtr is used and the file is stored to the directory in which the executed compiled map resides.

Append Log

Flag indicating what to do if the specified log file already exists. When set to true, the log messages are appended to the file. When set to false, the file is truncated, and the messages are written to the empty file. The default value is true.

Log File Path

Specifies the location of the log file to which to write log messages. If not specified, the default log file name p4actian.mtr is used and the file is stored to the directory in which the executed compiled map resides.