DelimitedFile

@Serializable
data class DelimitedFile(val path: String, val delimiter: Delimiter = Delimiter.COMMA, val hasHeader: Boolean = true, val layout: DatasetLayout = DatasetLayout.WIDE, val idColumn: String? = null, val valueColumn: String? = null, val datasetColumns: List<String>? = null) : DataSourceReference(source)

A delimited text file on disk. Layout, delimiter, header policy, and column-role bindings together fully describe how to extract datasets.

SINGLE layout requires WHITESPACE delimiter and ignores hasHeader, idColumn, valueColumn, and datasetColumns.

WIDE layout requires COMMA delimiter and hasHeader = true. If datasetColumns is non-null, only those header names are imported, in the order given; otherwise every column is imported in file order.

LONG layout requires COMMA delimiter, hasHeader = true, and both idColumn and valueColumn set. Rows are grouped by id (first-seen order) into one dataset each.

Constructors

Link copied to clipboard
constructor(path: String, delimiter: Delimiter = Delimiter.COMMA, hasHeader: Boolean = true, layout: DatasetLayout = DatasetLayout.WIDE, idColumn: String? = null, valueColumn: String? = null, datasetColumns: List<String>? = null)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard