apoc icon indicating copy to clipboard operation
apoc copied to clipboard

apoc.load.graphml does not create relationships named RELATED

Open neo-technology-build-agent opened this issue 3 years ago • 1 comments

Issue by ElaineRosenberg Friday Jan 10, 2020 at 22:29 GMT Originally opened as https://github.com/neo4j-contrib/neo4j-apoc-procedures/issues/1377


Guidelines

Please note that GitHub issues are only meant for bug reports/feature requests. If you have questions on how to use APOC, please ask on the Neo4j Discussion Forum instead of creating an issue here.

Expected Behavior (Mandatory)

According to the doc, the default relationship that this procedure creates should be RELATED.

Actual Behavior (Mandatory)

It is creating relationships : 1,2,3,4.... Even if I specify defaultRelationshipType: 'RELATED' it does not create the RELATED relationship in the graph

How to Reproduce the Problem

Simply run the Cypher statement below.

Simple Dataset (where it's possibile)

//Insert here a set of Cypher statements that helps us to reproduce the problem

Here is the code to reproduce:
CALL apoc.import.graphml(
  "http://sonetlab.fbk.eu/data/social_networks_of_wikipedia/vecwiki_social_network_extraction/vecwiki-20091230-manual-coding.graphml",
  { batchSize: 5000, readLabels: true , defaultRelationshipType: 'RELATED'}
)


### Steps (Mandatory)

  1. Start with an empty graph.
   2. Run the above Cypher
  

## Screenshots (where it's possibile)
After the load:

<img width="1866" alt="Screen Shot 2020-01-10 at 2 28 01 PM" src="https://user-images.githubusercontent.com/41334110/72190868-40af6880-33c6-11ea-9640-ff75e7e3089f.png">

## Specifications (Mandatory)

Currently used versions

### Versions

  - OS: OS X Catalina
  - Neo4j: 4.0.RC01
  - Neo4j-Apoc: apoc-4.0.0-rc01-all.jar

Comment by vga91 Tuesday May 11, 2021 at 08:58 GMT


@ElaineRosenberg The website provided is unreachable, so I can't replicate the anomaly. Could you, provide a .graphml that has the reported anomaly, if possible?

I cannot reproduce this and the file is not reachable, but what I suspect is happening is that the file has label attributes with those numbers (1,2,3..) on the edges. A label will be created with the given default type if and only if there is no label present on the graphml edge e.g will give the relationship the type "1". If someone else experiences this feel free to reopen with a working example of the bug :)

gem-neo4j avatar Jan 02 '25 13:01 gem-neo4j