Короче говоря, я взял длинный путь (написал сценарий):
import aerospike
import json
config = {
'hosts': [ ('10.0.0.1', 3000) ]
}
try:
client = aerospike.client(config).connect()
except:
import sys
print("rekt lol dump yourself", config['hosts'])
sys.exit(1)
query = client.query('dmp', 'whatever')
query.select('id', 'not_id', 'not_id_at_all')
with open('whatever.json', 'w') as out:
def processRecord(arg):
key, metadata, record = arg
out.write(json.dumps(record))
out.write('\n')
query.foreach(processRecord)