Data type on import

For neo4j-admin import, if I have a header file that looks like this:


Is there any way I can cast my userID as long? Perhaps in the relationship file? Something like this

:START_ID:long, :END_ID:long

The userIDs are rather lengthy strings so id like to cast them to longs to save space

You can use globally --id-type integer but that's for all ids.
Afaik it's not possible per type.

You could change it later, .e.g. with

call apoc.periodic.iterate("
SET u.userid = toInteger(u.userid)
",{batchSize:10000,iterateList:true, parallel:true})
1 Like