-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed as not planned
Labels
Stalearea/upsertIssues related to upsert operations.Issues related to upsert operations.dgraphIssue or PR created by an internal Dgraph contributor.Issue or PR created by an internal Dgraph contributor.exp/intermediateFixing this requires some experience with the project.Fixing this requires some experience with the project.kind/enhancementSomething could be better.Something could be better.
Description
Experience Report
What you wanted to do
Make a direct migration from Neo4J to Dgraph using the JSON structure that is exported via APOC.
What you actually did
uid(from) <val(EDGE)> val(to) .upsert {
query {
var(func: has(properties)) @filter(eq(type,"relationship") AND NOT has(migrationDone) ){
EDGE as label
properties {
summary as summary
rating as rating
roles as roles
}
start {
ID as id
}
end {
endID as id
}
summaryMe as sum(val(summary))
ratingMe as sum(val(rating))
rolesMe as sum(val(roles))
}
from(func: eq(id, val(ID) )) @filter(NOT eq(type,"relationship") AND NOT has(~start) AND NOT has(~end)) {
from as uid
}
to(func: eq(id, val(endID) )) @filter(NOT eq(type,"relationship") AND NOT has(~start) AND NOT has(~end)) {
to as uid
}
}
mutation {
set {
uid(from) <migrationDone> "True" .
uid(from) <val(EDGE)> val(to) .
# (...)
}
}
}Metadata
Metadata
Assignees
Labels
Stalearea/upsertIssues related to upsert operations.Issues related to upsert operations.dgraphIssue or PR created by an internal Dgraph contributor.Issue or PR created by an internal Dgraph contributor.exp/intermediateFixing this requires some experience with the project.Fixing this requires some experience with the project.kind/enhancementSomething could be better.Something could be better.