db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Suresh Thalamati (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-378) support for import/export of tables with clob/blob and the other binary data types will be good addition to derby,
Date Thu, 14 Dec 2006 22:50:23 GMT
    [ http://issues.apache.org/jira/browse/DERBY-378?page=comments#action_12458636 ] 
            
Suresh Thalamati commented on DERBY-378:
----------------------------------------

Import uses VTI to import data into a table from a file.  Just found out
that derby does not  support CLOB/BLOB data types with VTI. Any one remember 
why these types are  not supported ?

Currently all the columns in the import file are treated as VARCHAR type and 
cast them to the appropriate column type of the table, when the insert 
statement is generated. For example to import into a table T4(
create table t4( a int , b char(100)) );

INSERT INTO "T4"("A", "B") --DERBY-PROPERTIES insertMode=bulkInsert
SELECT  cast(COLUMN1 AS INTEGER) ,  COLUMN2  from new org.apache.derby.impl.load
d.Import('c:/suresht/databases/emp.dat',null,null,null, 2 ) AS importvti ;

Clob types column can casted from VARCHAR type, performance may be bad but it will work. 
Problem with blob data type is, it can be casted  from any other type. 

I am kind of stuck on how to extract the binary data from an import file and insert
into the table using the VTI, without VTI  support for CLOB/BLOB types.
types. 

Any ideas/suggestions ?


Thanks
-suresh

> support for  import/export  of  tables with clob/blob and the other binary data types
  will be good addition to derby,
> -----------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-378
>                 URL: http://issues.apache.org/jira/browse/DERBY-378
>             Project: Derby
>          Issue Type: Improvement
>          Components: Tools
>    Affects Versions: 10.1.1.0
>            Reporter: Suresh Thalamati
>         Assigned To: Suresh Thalamati
>         Attachments: iexlobs.txt
>
>
> Currently if  I have  a table that contains clob/blob column,  import/export operations
on that table
> throghs  unsupported feature exception. 
> set schema iep;
> set schema iep;
> create table ntype(a int , ct CLOB(1024));
> create table ntype1(bt BLOB(1024) , a int);
> call SYSCS_UTIL.SYSCS_EXPORT_TABLE ('iep', 'ntype' , 'extinout/ntype.dat' ,
>                                  null, null, null) ;
> ERROR XIE0B: Column 'CT' in the table is of type CLOB, it is not supported by th
> e import/export feature.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message