in src/main/java/com/aliyun/openservices/paifeaturestore/domain/SequenceFeatureView.java [260:289]
public void writeFeatures(List<Map<String, Object>> data) {
String itemIDField = this.config.getItemIdField();
String eventField = this.config.getEventField();
String timestampField = this.config.getTimestampField();
String playTimeField = this.config.getPlayTimeField();
if (data == null || data.isEmpty()){
throw new IllegalArgumentException("Data list must not be null or empty");
}
for (Map<String, Object> record : data){
Object itemIdValue = record.get(itemIDField);
if (itemIdValue == null || itemIdValue.toString().isEmpty()){
throw new IllegalArgumentException("Field '" + itemIDField + "' must not be null or empty for one of the records.");
}
Object eventValue = record.get(eventField);
if (eventValue == null || eventValue.toString().isEmpty()){
throw new IllegalArgumentException("Field '" + eventField + "' must not be null or empty for one of the records.");
}
Object timestampValue = record.get(timestampField);
if (timestampValue == null || timestampValue.toString().isEmpty() ||((Number)timestampValue).longValue() == 0){
throw new IllegalArgumentException("Field '" + timestampField + "' must not be null or empty for one of the records.");
}
if (playTimeField != null && !playTimeField.isEmpty()){
Object playTimeValue = record.get(playTimeField);
if (playTimeValue == null || playTimeValue.toString().isEmpty() ||((Number)playTimeValue).doubleValue() == 0.0){
throw new IllegalArgumentException("Field '" + playTimeField + "' must not be null or empty for one of the records.");
}
}
}
this.featureViewDao.writeFeatures(data);
}