I am wanting to upload a psv file with records holding key statistics for a physician, location and a practice, stored per day.
A unique key for this entry would consist of a:
physician name,
practice name,
location name, and
a date of service.
Four fields all together.
Configuration file example for Aerospike loader shows only version with single key, and I am not seeing the syntax for multiple entries.
Can someone advise me please if this would be possible to do (have configuration listing multiple key fields using columns from the loaded file), and also show me the example.
You can create a byte buffer and convert the fields into bytes then add them to the byte buffer. But when reading you will need to know the dataType or the format for keys to extract them from the byte buffer.
KeyIndexes = array containing the index of key fileds
Schema = schema of the fileds.
row = a single record to be written.
When extracting the values if you know the schema for the keys Like you made a key from int, int,Long you can extract by
first4bytes.toInt
andnext4.toInt
andLast8.toLong
.