IBM Db2
IBM Db2 is a database that contains relational data.
watsonx.data on Red Hat® OpenShift®
watsonx.data Developer edition
IBM Db2
Configure the following details for IBM Db2:
Field | Description |
---|---|
Display name | Enter the database name to be displayed on the screen. |
Database name | Enter the name of your database. |
Hostname | Enter the Hostname. |
Port | Enter the Port number. |
Authentication type | Choose and enter the Authentication type details:
|
Port is SSL enabled | Use the toggle switch to enable or disable SSL connection. If enabled, i. The Upload SSL certificate (.pem, .crt, .cert, or .cer) link is enabled. ii. Click the Upload SSL certificate (.pem, .crt, .cert, or .cer) link. iii. Browse the SSL certificate and upload. |
Test connection | Click the Test connection link to test the database connection. If the database connection is successful, a success message appears. |
Catalog name | Enter the name of the catalog. This catalog is automatically associated with your database. |
Create | Click Create to create the database. |
Note: Select IBM Db2 from the Database Type drop-down list to add IBM Watson Query.
You can now query the nicknames that are created in Db2 and the virtualized tables from Watson Query instances.
Features
You can perform the following operations for
BLOB
and CLOB
data
types for Db2 data source:- INSERT
- CREATE
- CTAS
- ALTER
- DROP
To insert CLOB
data type, provide the value directly or cast it explicitly to
CLOB
data type.
INSERT INTO <table_name> VALUES ('<clob value>', '<other values>');
INSERT INTO <table_name> VALUES (CAST('<clob text>' AS CLOB));
To insert BLOB
data, use the cast function with BLOB
data type.
The corresponding hexadecimal value is inserted into the Db2 data source:
INSERT INTO <table_name> VALUES (CAST('<blob text>' AS BLOB));
Limitations for SQL statements
ALTER TABLE DROP COLUMN
operation is not supported for column-organized tables.DROP TABLE
statement is supported only when enabled in the catalog.CREATE VIEW
can be used for a table only if that table is in the same catalog and the same schema.DROP SCHEMA
can doRESTRICT
by default.CREATE VIEW
withJOINS
is not supported.- For the database-based catalogs,
CREATE SCHEMA
,CREATE TABLE
,DROP SCHEMA
,DROP TABLE
,DELETE
,DROP VIEW
,ALTER TABLE
, andALTER SCHEMA
statements are not available in the Data manager UI.
Limitations for data types
BLOB
andCLOB
data types supportSELECT
statement but do not support operations such asequal
,like
, andin
.BINARY
data type supports onlySELECT
statement.- When the fields of data type
REAL
have 6 digits or more in the decimal part with the digits being predominately zero, the values when queried are rounded off. It is observed that the rounding off occurs differently based on the precision of the values. For example, a decimal number 1.654 when rounded to 3-digits after the decimal point are the same. Another example is 10.890009 and 10.89000. It is noticed that 10.89000 is rounded to 10.89, whereas 10.89009 is not rounded off. This is an inherent issue because of the representational limitations of binary floating point formats. This might have a significant impact when querying involves sorting.