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

[COPY FROM] Bug: Error: Copy exception: Unable to find primary key value 1344455615... (given missing UUID) #4880

Closed
sapalli2989 opened this issue Feb 10, 2025 · 2 comments · Fixed by #4883
Assignees
Labels
bug Something isn't working

Comments

@sapalli2989
Copy link
Contributor

Kùzu version

v0.8.0

What operating system are you using?

Fedora 40

What happened?

When using COPY ... FROM for a relation import file, the error message currently is not clear, if a relation misses a NODE record of its FROM or TO reference given as primary key type UUID . UUID seems to be coerced to a number, which makes debugging and identifyng missing records hard.

Are there known steps to reproduce?

Author.csv

id,name
8be3fe5e-b7d2-4274-9c47-bfdf384660ef,Adam
a2ed60d7-73de-45db-a25b-ce9700181d10,Karissa

Post.csv

id,content
6f05959a-ae56-4bdc-b716-1bf5b61122ed,content1
dd60f1eb-b47a-4786-8da7-e34de8a416d9,content2

has.csv

6f05959a-ae56-4bdc-b716-1bf5b61122ed,8be3fe5e-b7d2-4274-9c47-bfdf384660ef
dd60f1eb-b47a-4786-8da7-e34de8a416d9,e52545f6-78ca-4d72-a169-adab9f51d272

(Author e52545f6-78ca-4d72-a169-adab9f51d272 is missing)

init.cypher

CREATE NODE TABLE Author (id UUID PRIMARY KEY, name STRING);
CREATE NODE TABLE Post (id UUID PRIMARY KEY, content STRING);
CREATE REL TABLE has (FROM Post TO Author);
COPY Author FROM "Author.csv" (header = true);
COPY Post FROM "Post.csv" (header = true);
COPY has FROM "has.csv";

Shell

$ ./kuzu ./db -i init.cypher
-- Loading resources from init.cypher
Error: Copy exception: Unable to find primary key value 134445561571815692190729028995766145650.
Opening the database at path: ./db in read-write mode.
Enter ":help" for usage hints.
kuzu>
@sapalli2989 sapalli2989 added the bug Something isn't working label Feb 10, 2025
@acquamarin acquamarin self-assigned this Feb 11, 2025
@acquamarin
Copy link
Collaborator

acquamarin commented Feb 11, 2025

Hi @sapalli2989
This issue has been solved by #4883 . The PR gives better error message when the uuid pk doesn't exist.

@sapalli2989
Copy link
Contributor Author

Excellent, many thanks @acquamarin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants