diff --git a/data-prepper-plugins/csv-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/csv/CsvProcessorConfig.java b/data-prepper-plugins/csv-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/csv/CsvProcessorConfig.java index ec5d685b7e..8c770b597a 100644 --- a/data-prepper-plugins/csv-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/csv/CsvProcessorConfig.java +++ b/data-prepper-plugins/csv-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/csv/CsvProcessorConfig.java @@ -6,6 +6,7 @@ package org.opensearch.dataprepper.plugins.processor.csv; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyDescription; import jakarta.validation.constraints.AssertTrue; import java.util.List; @@ -20,24 +21,45 @@ public class CsvProcessorConfig { static final Boolean DEFAULT_DELETE_HEADERS = true; @JsonProperty("source") + @JsonPropertyDescription("The field in the event that will be parsed. Default value is `message`.") private String source = DEFAULT_SOURCE; @JsonProperty("delimiter") + @JsonPropertyDescription("The character separating each column. Default value is `,`.") private String delimiter = DEFAULT_DELIMITER; @JsonProperty("delete_header") + @JsonPropertyDescription("If specified, the event header (`column_names_source_key`) is deleted after the event " + + "is parsed. If there is no event header, no action is taken. Default value is true.") private Boolean deleteHeader = DEFAULT_DELETE_HEADERS; @JsonProperty("quote_character") + @JsonPropertyDescription("The character used as a text qualifier for a single column of data. " + + "Default value is `\"`.") private String quoteCharacter = DEFAULT_QUOTE_CHARACTER; @JsonProperty("column_names_source_key") + @JsonPropertyDescription("The field in the event that specifies the CSV column names, which will be " + + "automatically detected. If there need to be extra column names, the column names are automatically " + + "generated according to their index. If `column_names` is also defined, the header in " + + "`column_names_source_key` can also be used to generate the event fields. " + + "If too few columns are specified in this field, the remaining column names are automatically generated. " + + "If too many column names are specified in this field, the CSV processor omits the extra column names.") private String columnNamesSourceKey; @JsonProperty("column_names") + @JsonPropertyDescription("User-specified names for the CSV columns. " + + "Default value is `[column1, column2, ..., columnN]` if there are no columns of data in the CSV " + + "record and `column_names_source_key` is not defined. If `column_names_source_key` is defined, " + + "the header in `column_names_source_key` generates the event fields. If too few columns are specified " + + "in this field, the remaining column names are automatically generated. " + + "If too many column names are specified in this field, the CSV processor omits the extra column names.") private List columnNames; @JsonProperty("csv_when") + @JsonPropertyDescription("Allows you to specify a [conditional expression](https://opensearch.org/docs/latest/data-prepper/pipelines/expression-syntax/), " + + "such as `/some-key == \"test\"`, that will be evaluated to determine whether " + + "the processor should be applied to the event.") private String csvWhen; /**