View Issue Details

IDProjectCategoryView StatusLast Update
0000935SymmetricDSBugpublic2014-02-02 20:53
ReportercgledhillAssigned Tochenson 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version3.1.10 
Target Version3.2.0Fixed in Version3.2.0 
Summary0000935: dbexport null timestamp values from Oracle result in empty string ("") in CSV.
DescriptionI have noticed when the first field of an Oracle table is a timestamp and for records with null value, the result CSV output is the empty string ("") rather than just nothing. When importing this empty string into Postgres with dbimport, the insert fails. I ran sed on the CSV to remove the double quotes and then the import ran successfully.
Steps To ReproduceCreate an Oracle table with a single timestamp column and insert null into it and commit. run dbexport. You will see "" for the null timestamp record. Then, importing into a Postgres table results in an insert error.
Additional InformationLog output will be written to ../logs/ecnext38_pg.log
[] - AbstractCommandLauncher - Option: name=format, value={CSV}
[] - AbstractCommandLauncher - Option: name=properties, value={ecnext38_pg.prop}
[] - AbstractCommandLauncher - Option: name=schema, value={ecadm}
[] - AbstractCommandLauncher - Option: name=table, value={manta_subscriptions}
[] - DatabaseWriter - Failed to process a insert event in batch -9999.
Failed sql was: insert into "ecadm"."manta_subscriptions" ("activated", "billing_state", "cancelled", "created_time", "deactivated", "end_time", "initial_trans_id", "last_modified_by_subid", "last_trans_id", "modified_time", "sub_id", "type_id", "version", "sub_driver", "n_fails", "n_renewals", "n_resurrections", "end_time_orig", "id", "subscription_key", "cancelled_by_subid") values (cast(? as timestamp with time zone),?,cast(? as timestamp with time zone),cast(? as timestamp with time zone),cast(? as timestamp with time zone),cast(? as timestamp with time zone),?,?,?,cast(? as timestamp with time zone),?,?,?,?,?,?,?,cast(? as timestamp with time zone),?,?,?)
Failed row data was: "",,,"2012-01-20 16:08:16.000000 -05:00",,,,,,,"4w1thxgxnp4odd","126847","1","pbl-add_pickaview",,,,,"f3adf2b8-1145-41f1-92f8-9b745e64864e","7983e0c6-6a3c-4277-8e51-324e613d0041",
TagsNo tags attached.

Activities

There are no notes attached to this issue.

Related Changesets

SymmetricDS: master 51cd76bf

2012-11-30 15:54:37

chenson

Details Diff
0000935: dbexport null timestamp values from Oracle result in empty string ("") in CSV.
0000935
mod - symmetric-client/src/test/java/org/jumpmind/symmetric/DbExportImportTest.java Diff File
mod - symmetric-csv/src/main/java/org/jumpmind/symmetric/csv/CsvWriter.java Diff File

Issue History

Date Modified Username Field Change
2012-11-29 17:22 cgledhill New Issue
2012-11-30 15:54 chenson Fixed in Version => 3.2.0
2012-11-30 15:54 chenson Target Version => 3.2.0
2012-11-30 15:55 chenson Status new => closed
2012-11-30 15:55 chenson Assigned To => chenson
2012-11-30 15:55 chenson Resolution open => fixed
2014-02-02 20:53 Changeset attached => SymmetricDS trunk r6599
2015-07-30 21:49 chenson Changeset attached => SymmetricDS master 51cd76bf