Skip to content

SourceDiscovery overwrites the user's delimiter option with null for every CSV source, so a non-comma CSV cannot be imported via -url / IMPORT DATABASE #6811

Closed

Description

@ruispereira

Summary

SourceDiscovery.analyzeSourceContent() unconditionally writes knownDelimiter into settings.options, but leaves it null for EntityType.DATABASE. Since the user's -delimiter / WITH delimiter = ';' lands in that same map, it is destroyed for every CSV source, and there is no working alternative for the -url / SQL form.

Where (HEAD 9c9d024db)

integration/src/main/java/com/arcadedb/integration/importer/SourceDiscovery.java:235-246:

case DATABASE:
  // NO SPECIAL SETTINGS
  knownFileType = getFileTypeByExtension(settings.url);
  break;                                   // knownDelimiter stays null
...
if (knownFileType != null) {
  if ("csv".equalsIgnoreCase(knownFileType)) {
    settings.options.put("delimiter", knownDelimiter);    // <- clobbers the user's value with null

The DOCUMENT/VERTEX/EDGE cases set knownDelimiter from documentsDelimiter/verticesDelimiter/edgesDelimiter; DATABASE has no source for it. ImporterSettings.parseParameter() stores every parameter in options (:227), and CSVImporterFormat.analyze() (:705) plus createCSVParser() (:838-839) read exactly that key, falling back to ",".

Repro

IMPORT DATABASE file://data.csv WITH delimiter = ';' on a semicolon-delimited file:

id;name;age
1;Alice;30

Importer.load() routes the main -url as EntityType.DATABASE (Importer.java:73-79), the .csv extension short-circuits at SourceDiscovery:245, options["delimiter"] becomes null, and the whole line is parsed as one column: the analyzed schema gets a single property literally named id;name;age, and every record gets one property holding 1;Alice;30. The import reports success.

There is no workaround in this form: -documentsDelimiter and friends are never consulted for EntityType.DATABASE, and the delimiter auto-detection path is skipped entirely once the .csv extension matches (isSeparator() at :372 does not even list ;).

Confirmed that ImporterSettings.getValue() returns the default for a null map value, so the user's ; is genuinely gone rather than merely shadowed.

Suggested fix

Guard the put - if (knownDelimiter != null) settings.options.put("delimiter", knownDelimiter); - and give case DATABASE a delimiter source, either the generic delimiter option or documentsDelimiter.

Scope / confidence

High. Verified end to end from ImportDatabaseStatement (WITH delimiter = ';' -> setSettings -> parseParameter -> options) through to the CSV parser construction.

Activity

  1. added this to the 26.9.1 milestone on Aug 27, 2026
  2. added
    importer
    on Aug 27, 2026
  3. self-assigned this
    on Aug 27, 2026
  4. added
    in progress
    on Aug 27, 2026
  5. self-assigned this
    on Aug 28, 2026
  6. added a commit that references this issue on Aug 28, 2026
  7. lvca commented on Aug 28, 2026

    @lvca
    Member

    Fixed in #6865, released with 26.9.1.

    A non-comma CSV could not be imported through IMPORT DATABASE or -url: the delimiter you asked for was discarded and the file was read back as a single column, with a property literally named id;name;age. The import still reported success.

    IMPORT DATABASE file://data.csv WITH delimiter = ';' and -delimiter ';' now work as documented. As a bonus, ; was added to the delimiter auto-detection, so a semicolon-separated file whose name does not end in .csv is recognised without you having to specify anything.


    ❤️ Thanks for helping make ArcadeDB better! ArcadeDB is free and open source, sustained by its community. If it's useful to you or your company, please consider becoming a sponsor to keep development going.

  8. removed
    in progress
    on Aug 28, 2026
  9. ruispereira commented on Aug 31, 2026

    @ruispereira
    ContributorAuthor

    Validated against main at 55e00aaa6: fixed as reported, and the guard comment naming the issue is a nice touch.

    While checking it I found two sibling sites in the auto-detection path (SourceDiscovery.java:374 and :451) that still overwrite an explicitly supplied delimiter. Different trigger (unknown file extension) so out of this issue's scope - filed as #6946.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugimporter

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions