-
Notifications
You must be signed in to change notification settings - Fork 17
07 Custom Load Order
hkuich edited this page Nov 22, 2021
·
1 revision
The following is the default order of migrating data using TypeDB Loader:
- separate / independent attributes (
"attributes": {...}
) - entities (
"entities": {...}
) - relations (
"relations": {}...
) - attributes to be appended to existing entities or relations (
"appendAttribute": {}...
) - attributes to be appended to existing entities or insert entity with attributes (
"appendAttributeOrInsertThing": {}...
)
This sequence covers most use cases. Difficulties may arise for nested relations and appending attributes, because they require other things to be already present in the database. To customize the order of loading, you can add the following to your "globalConfig":
{
"globalConfig": {
...
"orderedBeforeGenerators": [
"person-1"
],
"orderedAfterGenerators": [
"person-2",
"person-3"
],
...
},
...
}
"orderedBeforeGenerators" are loaded in the specified order BEFORE the default loading order.
"orderedAfterGenerators" are loaded in the specified order AFTER the default loading order.