Search code examples
mysqlgephi

Importing nodes and edges to Gephi from MySQL breaks but same data from .csv works perfectly


The expected behavior is to simply import the nodes data from MySQL without change:

MySQL nodes table

However, Gephi is erasing all data from the ID column and replacing it with auto-incremented ID column:

Gephi nodes table after import

leading of course to errors importing the edges:

well, d'uh

Nothing special in the import queries:

Node Query: SELECT * FROM GEPHI_nodes Edge Query: SELECT * FROM GEPHI_edges


Solution

  • Apparently, when importing from a CSV, Gephi converts to lower case before looking for the 'id' column header:

    gephi.io.importer.plugin.file.spreadsheet.process.ImportNodesProcess
    
    lowerCaseHeaders.add(headerName.toLowerCase());
    

    Whereas importing from database:

    gephi.io.importer.plugin.database.EdgeListDatabaseImpl
    

    offers no such niceties.