I am using the IDMT to extract data from a MySQL database. I extracted the datamap.properties file and updated it so columns defined as TEXT would convert to CLOB(64K). This appears to have worked since the db2tables.sql create table command now correctly shows those columns defined as CLOB(64K).
The problem is there is only one data file created by the unload. I thought there would be a separate file containing the LOB column data that I could use with the LOBSINFILE parameter of the DB2 load command. Am I missing something here?
Re: Not creating separate LOB file2012-05-15T13:00:38ZThis is the accepted answer. This is the accepted answer.This is strange and sorry for the late response. I have moved away from the active maintenance of this tool. If you post your sample MySQL table ddl, I will look into this.
Re: Not creating separate LOB file2012-06-05T20:48:24ZThis is the accepted answer. This is the accepted answer.
- SystemAdmin 110000D4XK
Re: Not creating separate LOB file2012-06-05T21:38:11ZThis is the accepted answer. This is the accepted answer.
- GregWathen 270000TFR5
Re: Not creating separate LOB file2012-06-06T17:35:28ZThis is the accepted answer. This is the accepted answer.
- TapasGupta 2700050BMU
I changed the datamap.properties to this:
This resulted in generating the DB2 DDL correctly. For example, it converted this MySQL table:
CREATE TABLE A (
C1 char(22) NOT NULL,
C2 varchar(64) DEFAULT NULL,
C3 text NOT NULL,
C4 text NOT NULL,
C5 int(11) NOT NULL,
C6 date DEFAULT NULL,
C7 varchar(32) DEFAULT NULL,
PRIMARY KEY (C1)
) --ENGINE=ndbcluster DEFAULT CHARSET=latin1
CREATE TABLE A
C1 CHAR(22) NOT NULL ,
C2 VARCHAR(64) ,
C3 CLOB(64K) NOT NULL ,
C4 CLOB(64K) NOT NULL ,
C5 INT NOT NULL ,
C6 DATE ,
The problem, is that the data, no matter the length, is unloaded into a single file. This often ends up producing records over 100kb in length while the DB2 load program can only hendle up to 32kb records.
The unload file ends up looking like this for all rows:
When it should look something like this:
C1,C2,pointer to C3,pointer to C4,C5,C6,C7
With a separate file containing the LOB data for columns C3 and C4.
I have even tried changing the MySQL tables by modifying the columns to BLOB format. The unload still puts the data inline into one long record in a single file.
TapasGupta 2700050BMU2 Posts
Re: Not creating separate LOB file2012-06-15T15:04:31ZThis is the accepted answer. This is the accepted answer.
- GregWathen 270000TFR5
Made necessary changes to fix this. Updated version of tool will be available soon.