I tried to add a CSV file into aerospike using nodejs with the put()
command. It is showing all records but storing only last record. I need to store the entire CSV file into aerospike using client node js.
client.put(key, rec, function (error) {
if (error) {
console.log('error: %s ', error.message)
}
else {
console.log('Record %d written to database successfully.',count)
}
How to store a CSV file in aerospike using client nide js?
This is a repeated action if I understand it correctly. The problem is that since key
remains unchanged, put
will override it, the last overrides the penultimate, the penultimate its previous, etc. You will either need to have multiple different keys and use those or inside the loop concatenate your texts and use client.put
after the loop, but with the concatenated string.