Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Label creation via property values does not work with periodic.iterate #1934

Open
katarinasupe opened this issue Apr 12, 2024 · 0 comments
Open
Labels
bug bug community community Effort - Unknown Effort - Unknown Frequency - EveryTime Frequency - EveryTime Reach - VeryFew Reach - VeryFew Severity - S3 Severity - S3

Comments

@katarinasupe
Copy link
Contributor

Memgraph version
2.16, MAGE 1.16

Environment
Mac M1, Docker

Describe the bug
I was testing periodic.iterate() with a simple example of LOAD CSV from our docs which accidentally includes setting label with a property value. I noticed that in the end, the labels were not created correctly.

To Reproduce
Steps to reproduce the behavior:

  1. Copy the CSV file in Memgraph (/usr/lib/memgraph/file.csv)
id,name,label
100,Daniel,Person
101,Alex,Person
102,Sarah,Person
103,Mia,Person
104,Lucy,Person
  1. Run the following query in Memgraph:
CALL periodic.iterate(
  "LOAD CSV FROM '/usr/lib/memgraph/file.csv' WITH HEADER AS row RETURN row.label AS label, row.id AS my_id, row.name AS name", 
  "CREATE (p:label {id: my_id, name: name})", 
  {batch_size: 5000}) 
YIELD success, number_of_executed_batches
RETURN success, number_of_executed_batches;
  1. Check graph schema - there is no Person label on each node, but label.

Expected behavior
All nodes have Person labels, just like in case when I run:

LOAD CSV FROM '/usr/lib/memgraph/file.csv' WITH HEADER AS row 
CREATE (p:row.label {id: row.id, name: row.name})

Verification Environment
Once we fix it, what do you need to verify the fix?
Docker ARM image with MAGE

@katarinasupe katarinasupe added bug bug community community Effort - Unknown Effort - Unknown Severity - S3 Severity - S3 Frequency - EveryTime Frequency - EveryTime Reach - VeryFew Reach - VeryFew labels Apr 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug bug community community Effort - Unknown Effort - Unknown Frequency - EveryTime Frequency - EveryTime Reach - VeryFew Reach - VeryFew Severity - S3 Severity - S3
Projects
Development

No branches or pull requests

1 participant