aerospike / aerospike-loader

Aerospike Data Loader
42 stars 37 forks source link

Key Issue #8

Closed peeyush-rai closed 5 years ago

peeyush-rai commented 7 years ago

I have set with name NotificationTracker and i have to load a data using the json and dsv file.

JSON

{ "version" : "2.0", "dsv_config": { "delimiter": "," , "n_columns_datafile": 11, "header_exist": true},

"mappings": [ { "key": {"column_name":"id", "type": "string"},

      "set": { "column_name":"NotificationTracker" , "type": "string"},

      "binlist": [
        {"name": "trackerState",
         "value": {"column_name": "trackerState", "type" : "string"}
        },
        {"name": "userId",
         "value": {"column_name": "userId", "type" : "string"}
        },
        {"name": "templateId",
         "value": {"column_name": "templateId", "type" : "string"}
        },
        {"name": "msgSchdlTime",
         "value": {"column_name": "msgSchdlTime", "type" : "string"}
        },
        {"name": "msgDelveryTime",
         "value": {"column_name": "msgDelveryTime", "type" : "string"}
        },
        {"name": "channel",
         "value": {"column_name": "channel", "type" : "string"}
        }
        {"name": "notifType",
         "value": {"column_name": "notifType", "type" : "string"}
        },
        {"name": "creationTime",
         "value": {"column_name": "creationTime", "type" : "string"}
        },
        {"name": "schemaVersion",
         "value": {"column_name": "schemaVersion", "type" : "string"}
        }
      ]
  }

] }

DSV

id##NotificationTracker##trackerState##userId##templateId##msgSchdlTime##msgDelveryTime##channel##notifType##creationTime##schemaVersion MAP('{"trackrCreatnTm":"1498565268822", "userId":"Device1", "uniqueNo":"Device169836645834910572331498565268822"}')##NotificationTracker##2##Device1##SMS##1498565268899##1498565278905##0##2##1498565268827##2010000578

Error while running ./run_loader -h localhost -c config.json data.dsv

INFO AerospikeLoad :119 - Aerospike loader started INFO AerospikeLoad :205 - Number of data files:1 ERROR Parser :215 - "key" Key is missing in mapping. Mapping: {"set":{"column_name":"NotificationTracker","type":"string"},"binlist":[{"name":"trackerState","value":{"column_name":"trackerState","type":"string"}},{"name":"userId","value":{"column_name":"userId","type":"string"}},{"name":"templateId","value":{"column_name":"templateId","type":"string"}},{"name":"msgSchdlTime","value":{"column_name":"msgSchdlTime","type":"string"}},{"name":"msgDelveryTime","value":{"column_name":"msgDelveryTime","type":"string"}},{"name":"channel","value":{"column_name":"channel","type":"string"}},{"name":"notifType","value":{"column_name":"notifType","type":"string"}},{"name":"creationTime","value":{"column_name":"creationTime","type":"string"}},{"name":"schemaVersion","value":{"column_name":"schemaVersion","type":"string"}}],"Key":{"column_name":"id","type":"string"}} ERROR Parser :181 - Error in parsing mappingdef: {"set":{"column_name":"NotificationTracker","type":"string"},"binlist":[{"name":"trackerState","value":{"column_name":"trackerState","type":"string"}},{"name":"userId","value":{"column_name":"userId","type":"string"}},{"name":"templateId","value":{"column_name":"templateId","type":"string"}},{"name":"msgSchdlTime","value":{"column_name":"msgSchdlTime","type":"string"}},{"name":"msgDelveryTime","value":{"column_name":"msgDelveryTime","type":"string"}},{"name":"channel","value":{"column_name":"channel","type":"string"}},{"name":"notifType","value":{"column_name":"notifType","type":"string"}},{"name":"creationTime","value":{"column_name":"creationTime","type":"string"}},{"name":"schemaVersion","value":{"column_name":"schemaVersion","type":"string"}}],"Key":{"column_name":"id","type":"string"}} ERROR AerospikeLoad :213 - java.lang.Exception: Config file parsing Error INFO AerospikeLoad :220 - Aerospike loader completed INFO AerospikeLoad :227 - Loader completed in 0.093sec

devinaction commented 7 years ago

See this post on SO: https://stackoverflow.com/questions/44750811/missing-key-in-mapping ; bin_list

arrowplum commented 5 years ago

closing for inactivity. Please re-open if the workaround does not work for you.