View Issue Details

IDProjectCategoryView StatusLast Update
0001205SymmetricDSBugpublic2013-05-09 08:41
ReporterrottenAssigned To 
Prioritynormal 
Status newResolutionopen 
Product Version3.4.0 
Target VersionFixed in Version 
Summary0001205: dbexport --sql does not create importable CSV.
DescriptionWhen I use --sql to extract a subset of a table (coming from Oracle 10G)
$ dbexport -p mydb.properties --format CSV --schema myschema --sql "select id,created_ts,key,sub_id,used_ts from myschema.mytable where created_ts > to_timestamp('2013-05-05', 'YYYY-MM-DD')" mytable > mytable-recent.csv

dbimport fails with the resultant CSV. I tried both selecting each column individually, and selecting "*".

If I extract the entire table, without the --sql, it works fine.

If I run the same select statement in a CTAS:
create table myschema.mytemptable as select * from myschema.mytable where created_ts > to_timestamp('2013-05-05', 'YYYY-MM-DD');

And then select (without the --sql) the entire mytemptable, I can import that no problem.
Steps To ReproduceHere is the DDL for the table that gave me problems:

create table myschema.mytable
(
   ID NUMBER(10,0) NOT NULL,
   CREATED_TS TIMESTAMP (6) WITH TIME ZONE NOT NULL,
   KEY VARCHAR2(500 CHAR) NOT NULL,
   SUB_ID VARCHAR2(25 CHAR) NOT NULL,
   USED_TS TIMESTAMP (6) WITH TIME ZONE,
   PRIMARY KEY (ID)
);
Additional InformationI've attached the first 20 rows of:
1) a dbexport with --sql
2) a dbexport without --sql (from the mytemptable).

Activities

rotten

2013-05-09 08:41

reporter  

mytable--sql.csv (171,528 bytes)

rotten

2013-05-09 08:41

reporter  

mytemptable.csv (2,191 bytes)

Issue History

Date Modified Username Field Change
2013-05-09 08:41 rotten New Issue
2013-05-09 08:41 rotten File Added: mytable--sql.csv
2013-05-09 08:41 rotten File Added: mytemptable.csv