Was this helpful?
ODBC 3.x
The term ODBC stands for Open Database Connectivity. This is a standard promulgated by Microsoft to allow client-side Windows applications to access various backend databases through a single common interface. The ODBC 3.x connector provides method (sometimes the only method) of connecting to a particular file format.
Note:  This connector only supports 64-bit ODBC drivers.
In most cases, the integration platform connects to the file formats directly through knowledge of physical file formats (for example, ASCII, Lotus, xBASE), or through the native interfaces supplied by the vendors who define a particular data format such as Oracle.
The integration platform's ODBC 3.x support allows you to access data from any application that has Windows or Unix\AS400-compliant ODBC driver.
Tip...  This connector is designed for non-Unicode ODBC 3.x data sources with an ODBC version earlier than ODBC 3.5. If your data source is a Unicode-based, ODBC 3.5x-compliant data source, use the ODBC 3.5 connector. See ODBC 3.5.
We do not sell or distribute ODBC drivers, so you must obtain ODBC drivers from another vendor.
Some basic ODBC drivers are installed automatically with some Windows operating systems. However, the drivers are not configured automatically, so you must use the operating system's ODBC Administrator to configure the driver. The ODBC Admin is called Data Sources (ODBC) and is available in the Control Panel under Administrative Tools.
For information on installing ODBC drivers, see Installing an ODBC Driver.
Connectivity Pointers
If your database has many tables, selecting the table from a list may take more time than typing the UserID.Tablename value in the Source Table/View box. If you enter the table name without the user ID and then connect to the database, you can reselect the table in the source data browser to view it.
If possible, create query statements using the source database application, so that syntax and validity can be checked by the native application. You can then copy the query statement and paste it in the Query Statement Box.
Connector-Specific Notes
Connecting with the Client AS400 ODBC driver can result in slow run times. Other ODBC driver vendors may offer better performance.
Although Excel has a Windows-compliant ODBC driver and the Excel File option may appear for the data source when you use the ODBC connector, the integration platform cannot connect with Excel files because they consist of worksheets rather than tables.
SQL Server: The use of Regional settings in ODBC DSN connections to SQL Server databases is not supported in this release. In order for currency, numbers, dates and times to be interpreted correctly, ensure that the Use regional settings when outputting currency, numbers, dates and times checkbox in the SQL Server DSN settings is not checked. Then in the ODBC connector DriverOptions property, type Regional=No.
The unixODBC version of the connectors must use the libdb2o.so driver in the odbc.ini file.
Switching Between iODBC and unixODBC on Linux - The ODBC 3.5 and ODBC 3.x connectors are configured during installation to work with the iODBC driver manager. Users with the unixODBC driver manager must switch to the unixODBC versions.
To switch to the unixODBC connectors, run the following commands as root.
cd <installdir>/runtime/di9
rm -f djodbc3.so djodbc35.so
ln -s djodbc3.unixodbc.so djodbc3.so
ln -s djodbc35.unixodbc.so djodbc35.so
chown diuser.diusers djodbc3.so djodbc35.so
To revert to the iODBC connectors, run the following commands as root.
cd <installdir>/runtime/di9
rm -f djodbc3.so djodbc35.so
ln -s djodbc3.iodbc.so djodbc3.so
ln -s djodbc35.iodbc.so djodbc35.so
Connector Parts
Connector parts are the fields you configure to connect with a data source or target.
The settings that are available depend on the connector you select.
For a list of all parts for source connectors, see Specifying Connector, Parts, and Properties.
For a list of all parts for target connectors, see Specifying Connector, Parts, and Properties.
Property Options
You can specify the following source (S) and target (T) properties:
Property
S/T
Description
CursorType
S
The type of cursor to use for retrieving records from the source table. The choices available are Forward Only, Static and Dynamic. The default setting is Forward Only. For more information, see Cursors.
WhereStmt
S
Provides a pass-through mechanism for SQL connectors where advanced users can construct the Where clause of the SQL query themselves. It can be used as an alternative to writing a lengthy query statement. You may use this to instruct the SQL database server to filter the data based on a particular condition before sending it to the integration platform. There is no default value for this property.
Note:  This property is not applicable when the source connection is a query statement or file. This property enables data filtering when you select a table.
AutoCommit
T
If set to True, it allows you to automatically commit changes as they are made by each SQL statement, instead of waiting until the end of the transaction.
Also, if this option is set to True, you cannot roll back changes after they are done. It will overwrite the CommitFrequency value, which means that the changes are committed by each SQL statement irrespective of the value set for CommitFrequency.
The default value is False.
BulkOperations
T
Use bulk operations for faster insert. This property determines if an insert statement is executed for each record or a bulk add is executed for each record. The default is false, the slower setting. To maximize speed and instruct the integration platform to use a bulk add, change this setting to true.
CommitFrequency
T
Allows you to control how often data is committed to the database when the AutoCommit property is set to False.
The default value is zero that is, the data is committed at the end of the transformation, allowing rollback on error. This is the slowest setting. When performing large transformations, this is not practical as it may produce too many transaction log entries.
Specifying a nonzero value indicates that data is committed to the database after inserting or updating specified number of records.
ConstraintDDL
T
Allows you to specify additional SQL data definition language statements to be executed after their target table is created. This is similar to the support we provide for SQL pass-through in the SQL import connectors. Each line must be a valid ODBC DDL statement. No default exists for this property.
For example, you could have the statements:
CREATE UNIQUE INDEX index1 ON mytable (Field1 ASC)
CREATE INDEX index2 ON mytable (Field2, Field3)
These statements would create two indices on the table "mytable". The first one does not allow duplicates and the index values are stored in ascending order. The second index is a compound index on fields Field2 and Field3.
The ConstraintDDL is executed only if the replace mode is used for the target. If there are any errors, the errors are written to the error and event log file. An error during transformation brings up the transformation error dialog box. If you want to ignore the DDL errors, you may continue the transformation.
ConstraintDDL also supports an escaping mechanism that allows users to specify DDL in the native SQL of the DBMS. Any statement that is preceded by an "@" is sent straight to the DBMS.
The statement
@CREATE INDEX pk_mytable ON mytable (Field1, Field2) WITH PRIMARY
is a DDL statement for creating a primary key for the table mytable. Some ODBC drivers do not support the SQL extensions needed to create a primary key with the ODBC variant of the SQL CREATE statement. So to create primary keys in these cases, use native SQL.
Note:  This option works only in REPLACE mode.
UseCursors
T
The UseCursors property allows you to turn cursor support on or off. The default is false. If set to true and the specified ODBC driver does not support cursor inserts, the integration platform uses the SQL INSERT mode of adding records.
For exports, cursor support is supposed to enhance the performance of inserting records. This appears to be the case for desktop databases. For database servers, there is no noticeable change in insert speed. They seem to execute prepared queries about as quickly as they handle cursor inserts
Another complication of cursor inserts is that some drivers require that the target table be indexed, otherwise positioned updates (cursors) are not allowed. Two additional properties in the ODBC export connector address this issue: PrimaryKey and ConstraintDDL.
ArraySize
T
Determines the number of rows to be sent to the server at one time. The default value is 1000, meaning each row is individually sent to the server. Larger values will buffer multiple rows and send them all at once. While this improves the speed, it affects error reporting (a server error won't be detected/reported until the next batch of records is sent to the server).
The maximum value allowed for this property is 100000. While the connector allows the value to be set that high, many drivers have lower limits. The connector will log a message indicating if the driver is forcing a lower value for the array size. In addition, the connector does not support arrays when there is a LOB-type field in the table, or when the (maximum) length of a character-type field is longer than 32767 characters. In these cases, a message will be logged indicating the array size has been reduced to 1.
Due to the way the connector attempts to support older drivers, the array support requires BulkOperations and UseCursors is set to True or both must be set to False. If BulkOperations is False and UseCursors is True, then the array size is ignored and a message is logged indicating this condition.
DriverCompletion
S/T
Allows you to control whether or not the driver prompts you for information. The options available are Prompt, Complete (default), Complete Required and No Prompt. The Prompt option prompts you for every individual bit of information. Complete prompts you for any information they forgot to enter. The Complete Required option prompts you only for information that is essential to complete the connection. The No Prompt option does not prompt you for any information.
DriverOptions
S/T
Default is empty for a new map. This property will be automatically populated with ODBC connect string upon successful connection.
For ODBC connectors, the map saved database information in the Driver Option property with real values (not using macros) during the last successful connection. If you want to run the map with a different database server, you have to delete the value for Driver Option and use the correct macros for the connection information. The map repopulates the value of Driver Option when it successfully connects to the new database server.
DSNType
S/T
Data sources or drivers to connect to in the Data Source Name (DSN) list. DSNs are listed in Control Panel > Administrative Tools > ODBC Data Source Administrator window. The options are:
User & System: This is the default option.
System: This DSN allows database access for any user of a particular computer. The System DSN are stored in the Windows registry.
User: This DSN allows database access for a single user on a single computer. Like the System DSN, the information is stored in the Windows registry.
Driver: The ODBC driver to connect to. This driver must be installed on your computer.
File: This DSN stores information required to connect to the desired data source in a text file with a .DSN extension (not in the Windows registry) and can be shared by users of different computers who have the same drivers installed.
For more information, see Configuring ODBC Data Source.
IdentifierQuotes
S/T
All databases have what are called quoted identifiers. You use quoted identifiers to make the SQL statement parseable and distinguish between columns and character data in SQL statements. For example, Oracle uses double quotes for column and table names in SQL statements and uses single quotes for character data. In a SQL statement, you should enclose identifiers containing special characters or match keywords in identifier quote characters; (also known as delimited identifiers in SQL-92). For example, the Accounts Receivable identifier is quoted in the following SELECT statement:
SELECT * FROM "Accounts Receivable"
If you do not use identifier quotes, the parser assumes that there are two tables, Accounts and Receivable, and returns a syntax error indicating that they are not separated by a comma.
IdentifierQuotes has four options:
Default
None
"
'
MaxDataLength
S/T
The maximum data length for long data types. The default is 1 MB. You can reset this number as you choose based on your available memory capabilities and Target requirements.
Some ODBC drivers have limitations concerning the maximum data length they can handle. If you choose an Application (ODBC) source or target connector and the default setting is not 1 MB, the integration platform presets the default for the capabilities of that particular ODBC driver. It is not recommended that the MaxDataLength property be set any higher under those conditions.
ModifyDriverOptions
S/T
Allows you to store the ODBC connection. The default is true. If you set this to false, you are prompted for your connection information each time you run the transformation.
PrimaryKey
S/T
The PrimaryKey property allows you to specify a list of field names that are used to make the primary key. Field names are delimited by commas. If the PrimaryKey property contains one or more field names, these names are included in the SQL CREATE statement when the connector is in replace mode. No default exists for this property.
There is one additional requirement for using the PrimaryKey property. The ODBC driver must support integrity enhancement facility (IEF). Only the more advanced ODBC drivers support this.
Synonyms
S/T
If set to true this property allows you to see synonyms. The alias names appear in the table list along with the tables. Default is false.
SystemTables
S/T
The SystemTables property is only applicable if you are logged onto the database as the database administrator. Only the DBA has access to SystemTables. If set to true, this property allows you to see all the tables created by the DBA. The system table names appear in the table list. The default is false.
TransactionIsolation (v3.x and v3.5 only)
S/T
The Translation Isolation option allows you to specify any one of five different isolation levels when reading from or writing to a database table with ODBC. The default is Serializable.
The ANSI SQL 2 standard defines three specific ways in which serializability of a transaction may be violated: P1 (Dirty Read), P2 (Nonrepeatable Read) and P3 (Phantoms).
The following lists the four supported isolation levels.
READ_UNCOMMITTED – Permits P1, P2, and P3.
READ_COMMITTED – Permits P2 and P3. Does not permit P1.
REPEATABLE_READ – Permits P3. Does not permit P1 and P2.
SERIALIZABLE – Does not permit any of P1, P2, and P3.
For further details about TransactionIsolation levels, see the Microsoft ODBC SDK documentation.
Views
S/T
If set to True, this property allows you to see the view names in the table list along with the table names. Default is True.
Note:  This property supports only Append and DeleteAndAppend output modes and does not support the Replace output mode.
Encoding
S/T
Sets the character encoding for ODBC 3.x source and target files.
Note:  Shift-JIS encoding is used only in Japanese operating systems. UCS-2 is no longer a valid encoding name, but you may use UCS2 by changing the string value in the XML file.
Supported Data Types
The following data types are supported:
Binary
Bit
Byte
Char
Counter
Currency
Datetime
Double
Guid
Integer
LongBinary
LongChar
Real
SmallInt
Varbinary
VarChar
If you are appending data to an existing table, the data type of each field uses the data type in the selected table by default.
Length
These are field lengths in your data. If you need to change field lengths, reset them in the schema.
Last modified date: 02/09/2024