GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — CSV importer bug · Issue #2267 · ArcadeData/arcadedb

CSV importer bug #2267

New issue
Copy link
New issue
Copy link
Closed
Bug
Closed
CSV importer bug#2267
Bug
Copy link
Assignees
lvca
Milestone
26.1.1

Description

@ruispereira
ruispereira
opened on Jun 16, 2025
Issue body actions

I tried to insert millions of records in the database, using for that csv files previously generated with a python script. The python script generated the vertex which i could insert without issues, the problem is when i try to insert the edges, i have an error that don't let me insert them: "edge type 'Belongs' not defined".

Steps to reproduce:

  • apply the schema previously (with vertex, edges, indexes, and so on)
  • create the vertex
  • create the edges (failure)

Activity

  1. tolgaulas commented on Jun 16, 2025

    @tolgaulas
    tolgaulas
    on Jun 16, 2025
    More actions

    can be semantic issue. can you share the scema and the commands sent?

    Reacted by Rui Pereira
  2. ruispereira commented on Jun 16, 2025

    @ruispereira
    ruispereira
    on Jun 16, 2025
    ContributorAuthor
    More actions

    edges.csv
    empty.csv
    import-data.sql.txt rename to .sql and fix the folder
    schema.sql.txt rename to .sql
    supervisors.csv
    tenants.csv

  3. ruispereira commented on Jun 16, 2025

    @ruispereira
    ruispereira
    on Jun 16, 2025
    ContributorAuthor
    More actions

    docker exec -it arcadedb bin/console.sh

    load import-data.sql

  4. ruispereira commented on Jun 16, 2025

    @ruispereira
    ruispereira
    on Jun 16, 2025
    ContributorAuthor
    More actions

    Image

    This is what i have in the logs after trying to import the edges.

    If you check the schema, i have the edge type created, check also the import-data.sql data contains the sql commands that i perform.

    I have the commands separated but i also tried with vertex and edge in the same command.

  5. gramian commented on Jun 16, 2025

    @gramian
    gramian
    on Jun 16, 2025
    Collaborator
    More actions

    Additionally, current head produces a Error on transaction execution / Transaction not begun for IMPORT DATABASE depending on if file:// is used for the empty.csv.

    Reacted by Rui Pereira
  6. ruispereira commented on Jun 16, 2025

    @ruispereira
    ruispereira
    on Jun 16, 2025
    ContributorAuthor
    More actions

    Yes, i had to create an empty.csv to run the command

  7. gramian commented on Jun 16, 2025

    @gramian
    gramian
    on Jun 16, 2025
    Collaborator
    More actions

    For importing the edges:

    1. Add a header line to the edges.csv for example Tenant, Supervisor (or use the edgesHeader setting),
    2. in the IMPORT DATABASE command use edgeFromField=Supervisor and edgeToField=Tenant
    3. and not typeIdProperty=id, typeIdType=Long
    Reacted by Rui Pereira
  8. tolgaulas commented on Jun 16, 2025

    @tolgaulas
    tolgaulas
    on Jun 16, 2025
    More actions

    Can't comment on the code side, but i noticed the vertex files has header and edge file has no header.. can it be it?

    Reacted by Rui Pereira
  9. ruispereira commented on Jun 16, 2025

    @ruispereira
    ruispereira
    on Jun 16, 2025
    ContributorAuthor
    More actions

    i had a header previously, and i got an error while importing the edges. But i will put it again, and try.

  10. ruispereira commented on Jun 16, 2025

    @ruispereira
    ruispereira
    on Jun 16, 2025
    ContributorAuthor
    More actions

    For importing the edges:

    1. Add a header line to the edges.csv for example Tenant, Supervisor (or use the edgesHeader setting),
    2. in the IMPORT DATABASE command use edgeFromField=Supervisor and edgeToField=Tenant
    3. and not typeIdProperty=id, typeIdType=Long

    cat edges.csv
    Tenant,Supervisor
    0,10
    ...

    like this, right?
    And for edgeFromField and EdgeToField: IMPORT DATABASE file:///home/arcadedb/bug/empty.csv WITH edges="file:///home/arcadedb/bug/edges.csv", edgesFileType=csv, edgeType="Belongs", edgeFromField=Tenant, edgeToField=Supervisor;

  11. ruispereira commented on Jun 16, 2025

    @ruispereira
    ruispereira
    on Jun 16, 2025
    ContributorAuthor
    More actions

    Console:

    {test123}> IMPORT DATABASE file:///home/arcadedb/bug/empty.csv WITH edges="file:///home/arcadedb/bug/edges.csv", edgesFileType=csv, edgeType="Belongs", edgeFromField=Tenant, edgeToField=Supervisor
    ERROR:
    com.arcadedb.remote.RemoteException: Error on executing remote operation IMPORT DATABASE file:///home/arcadedb/bug/empty.csv WITH edges="file:///home/arcadedb/bug/edges.csv", edgesFileType=csv, edgeType="Belongs", edgeFromField=Tenant, edgeToField=Supervisor (cause:com.arcadedb.integration.importer.ImportException detail:Error on parsing source 'file:///home/arcadedb/bug/edges.csv (compressed=false size=48)')
    at com.arcadedb.remote.RemoteHttpComponent.manageException(RemoteHttpComponent.java:500)

    Logs:

    2025-06-16 10:32:01.063 INFO [SourceDiscovery] <ArcadeDB_0> Analyzing url: file:///home/arcadedb/bug/empty.csv...
    2025-06-16 10:32:01.069 INFO [SourceDiscovery] <ArcadeDB_0> Recognized format CSV (parsingLimitBytes=9.54MB parsingLimitEntries=0)
    2025-06-16 10:32:01.069 INFO [Importer] <ArcadeDB_0> Checking schema...
    2025-06-16 10:32:01.071 INFO [CSVImporterFormat] <ArcadeDB_0> Started importing documents from CSV source
    2025-06-16 10:32:01.074 INFO [CSVImporterFormat] <ArcadeDB_0> Importing the following document properties: []
    2025-06-16 10:32:01.077 INFO [CSVImporterFormat] <ArcadeDB_0> Importing of documents from CSV source completed in 0 seconds (0/sec)
    2025-06-16 10:32:01.077 INFO [CSVImporterFormat] <ArcadeDB_0> - Parsed lines...: 0
    2025-06-16 10:32:01.077 INFO [CSVImporterFormat] <ArcadeDB_0> - Total documents: 0
    2025-06-16 10:32:01.077 INFO [SourceDiscovery] <ArcadeDB_0> Analyzing url: file:///home/arcadedb/bug/edges.csv...
    2025-06-16 10:32:01.079 INFO [CSVImporterFormat] <ArcadeDB_0> Reading header from 1st line in data file: [Tenant, Supervisor]
    2025-06-16 10:32:01.080 INFO [SourceDiscovery] <ArcadeDB_0> Recognized format CSV (parsingLimitBytes=9.54MB parsingLimitEntries=0)
    2025-06-16 10:32:01.080 INFO [Importer] <ArcadeDB_0> Checking schema...
    2025-06-16 10:32:01.083 INFO [CSVImporterFormat] <ArcadeDB_0> Started importing edges from CSV source (expectedVertices=4 expectedEdges=8)
    2025-06-16 10:32:01.084 INFO [CSVImporterFormat] <ArcadeDB_0> Importing the following edge properties: [Tenant, Supervisor]
    2025-06-16 10:32:01.387 INFO [CSVImporterFormat] <ArcadeDB_0> Importing of edges from CSV source completed in 0 seconds (0/sec)
    2025-06-16 10:32:01.387 INFO [CSVImporterFormat] <ArcadeDB_0> - Parsed lines......: 7
    2025-06-16 10:32:01.387 INFO [CSVImporterFormat] <ArcadeDB_0> - Total edges.......: 0
    2025-06-16 10:32:01.387 INFO [CSVImporterFormat] <ArcadeDB_0> - Total linked Edges: 0
    2025-06-16 10:32:01.387 INFO [CSVImporterFormat] <ArcadeDB_0> - Skipped edges.....: 6
    2025-06-16 10:32:01.388 INFO [PostCommandHandler] <ArcadeDB_0> Error on command execution (PostCommandHandler): Error on importing database

  12. gramian commented on Jun 16, 2025

    @gramian
    gramian
    on Jun 16, 2025
    Collaborator
    More actions

    It is not working with 25.5.1 for me either. I assume the problem is that the last import command does not know which types are to be connected. So an idea would be to make a base type for tenant and supervisor with a property id, ie entity and pass vertexType=entity, typeIdProperty=id, and typeIdType=Long in the last import command again. I will try this later this afternoon. But feel free to try yourself.

    Reacted by Rui Pereira
  13. ruispereira commented on Jun 16, 2025

    @ruispereira
    ruispereira
    on Jun 16, 2025
    ContributorAuthor
    More actions

    Not sure what you mean with a "base type for tenant and supervisor", please provide an example, so i can try in a minute.

  14. gramian commented on Jun 16, 2025

    @gramian
    gramian
    on Jun 16, 2025
    Collaborator
    More actions

    For example:

    CREATE VERTEX TYPE Entity;
    CREATE PROPERTY Entity.id LONG;
    
    CREATE VERTEX TYPE Tenant EXTENDS Entity;
    CREATE VERTEX TYPE Supervisor EXTENDS Entity;
    
  15. gramian commented on Jun 16, 2025

    @gramian
    gramian
    on Jun 16, 2025
    Collaborator
    More actions

    Hmm just tried it, it seems it does not work as the importet does not see derived properties.

  16. ruispereira commented on Jun 16, 2025

    @ruispereira
    ruispereira
    on Jun 16, 2025
    ContributorAuthor
    More actions

    For example:

    CREATE VERTEX TYPE Entity;
    CREATE PROPERTY Entity.id LONG;
    
    CREATE VERTEX TYPE Tenant EXTENDS Entity;
    CREATE VERTEX TYPE Supervisor EXTENDS Entity;
    

    ah ok, understood. with inheritance extending from a base type, got it.

  17. ruispereira commented on Jun 16, 2025

    @ruispereira
    ruispereira
    on Jun 16, 2025
    ContributorAuthor
    More actions

    Hmm just tried it, it seems it does not work as the importet does not see derived properties.

    humm :x

  18. ruispereira commented on Jun 26, 2025

    @ruispereira
    ruispereira
    on Jun 26, 2025
    ContributorAuthor
    More actions

    Any update on this one?

  19. lvca commented on Jan 23, 2026

    @lvca
    lvca
    on Jan 23, 2026
    Member
    More actions

    Tried to reproduce the issue, and I'm not sure to have understood correctly the issue :-)

    When vertices of different types are imported in separate IMPORT DATABASE commands, followed by edges in another separate command, all edges were being skipped.
    The issue occurred because:

    1. Each IMPORT DATABASE command creates a new GraphImporter instance with an empty in-memory vertex index
    2. When importing edges, the importer couldn't find vertices (they were only in the database, not in the new empty in-memory index)
    3. Additionally, even if edges were created, incoming edge links weren't established because the linking process iterated through the empty vertex index
  20. lvca
    added this to the 26.1.1 milestone on Jan 23, 2026
  21. lvca
    added the
    Bug
    issue type on Jan 23, 2026
  22. lvca
    self-assigned this
    on Jan 23, 2026
  23. lvca
    added a commit that references this issue on Jan 23, 2026

    fix: import database command lookup for vertices if are not loaded in…

    c5ab3b0
  24. lvca
    added
    fixed / implemented
    on Jan 23, 2026
  25. lvca
    closed this as completedon Jan 23, 2026
  26. robfrank
    added a commit that references this issue on Feb 11, 2026

    fix: import database command lookup for vertices if are not loaded in…

    3986476
  27. tae898
    added a commit that references this issue on Jun 28, 2026

    fix: import database command lookup for vertices if are not loaded in…

    b7b0374
  28. mergify
    added a commit that references this issue on Aug 30, 2026

    chore(deps): bump https://github.com/pycqa/isort from 8.0.1 to 9.0.0 …

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

Metadata

Metadata

Assignees

  • @lvca
    lvca

Labels

No labels
No labels

Type

Bug

Projects

No projects

    Milestone

    • 26.1.1

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.