Forum Stats

  • 3,827,533 Users
  • 2,260,790 Discussions
  • 7,897,294 Comments

Discussions

Delimiter not saved to SQL Developer import settings xml

jmarton
jmarton Member Posts: 92
edited Dec 16, 2015 12:52PM in SQL Developer

When importing a CSV file to an existing table, SQL Developer (since 4.1?) offers the "Save state" option to save the import sessings to a SQLDeveloper Import Settings file (.sdimp) and "Restore state" to reuse import settings from GUI as well as from the command line utility "sdcli utility import"

The selected delimiter is not saved in the file, so when I try to use the import settings file with a delimiter other than the default (comma -- at least on my system), import fails.

Steps to reproduce:

  1. create a table with two varchar(50) columns
  2. prepare a CSV with 2 fields, delimited by semicolon (;) (BTW: file content preview is updated only on the second click on semicolon, which is annoying, but can be worked around)
  3. right click on the table in the object navigator, and choose "import data".
  4. select format: CSV, Delimiter: semicolon (and other options as required)
  5. next-next..., and before Finish, save the import settings by clicking on "Save state".
  6. complete the import data wizard.
  7. see that the resulting XML file does not have delimiter at /IMPORT_TOOL/IMPORT_DATA_FORMAT

And now try to use the import settings file:

  1. right click on the table in the object navigator, and choose "import data".
  2. click on "restore state", select the previously saved import settings file, and see that delimiter is not applied.
  3. SQL Developer will also not find the columns, so an error message will be displayed cited below, as it was unable to find the 2nd column in the CSV file

This error makes it impossible to import a semicolon-delimited CSV file using "sdcli utility import"

  1. please correct this bug
  2. is there a TAG that I should add to the SDimp file that "Restore state" would process, so I can work around this bug until it will be corrected? (I tried /IMPORT_TOOL/IMPORT_DATA_FORMAT/DELIMITER but it didn't work)
  3. BTW: while the SDimp file contains /IMPORT_TOOL/IMPORT_DATA_FORMAT/DELIMITER for file format "delimited", restore import setting does not work at all for formats: text, delimited

Error message shown when restoring import state:

Errors or differences detected opening configuration file .  Import errors may occur if you proceed.
Configuration file contains connection sample_connection.
Configuration file contains table DEMOUSER.TABLE.
Configuration file contains file /home/user/temp/sample.csv.
Field [Ljava.lang.Object;@7ff07003
 in configuration file is not specified in the data file.File definition saved in the configuration file does not match the import file.
Field COLUMN2 in configuration file is not specified in the data file.

Tagged:

Answers

  • thatJeffSmith-Oracle
    thatJeffSmith-Oracle Distinguished Product Manager Posts: 8,617 Employee
    edited Dec 16, 2015 12:34PM

    I'll take a look-see but it would be best if you could file an SR with MOS

  • jmarton
    jmarton Member Posts: 92
    edited Dec 16, 2015 12:52PM

    OK, I've filed SR 3-11876368241 in MOS.


    What I've forgotten to add here is the software versions used:

    SQL Developer version: 4.1.2.20.64

    Oracle JDK: 1.8.0_31, 64bit, Linux

    Instant client: x64-12.1.0.2.0 (inactive per SQL Developer configuration)

    The same erroneous behaviour on Windows 8, SQL Developer version: 4.1.2.20.64, Oracle JDK 8u66, 32bit.

This discussion has been closed.