private static List buildRecord()

in Java/src/main/java/com/example/customername/FeatureGroupRecordOperations.java [14:32]


    private static List < FeatureValue > buildRecord(String[] featureNames, String[] featureValues, boolean isIgnoreIdxColumn) {
        List < FeatureValue > featureRecordsList = new ArrayList < FeatureValue > ();

        for (int i = 0; i < featureValues.length; i++) {
            // Skip the first column if it's an index column (isIgnoreIdxColumn is set to true)
            if (i == 0 && isIgnoreIdxColumn) {
                continue;
            } else{
                FeatureValue feature = FeatureValue.builder()
                .featureName(featureNames[i])
                .valueAsString(featureValues[i])
                .build();

                featureRecordsList.add(feature);
            }            
        }

        return featureRecordsList;
    }