-
- All Known Implementing Classes:
JsonPatternBasedDiscovery,PatternBasedDiscovery
public interface TextRecordDiscovererA generator of text record schemas. ATextRecordDiscoverercan be used with delimited text data to produce schemas for reading and writing.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description TextRecorddiscoverForRead(List<List<String>> rows, boolean containsHeader, TextConversionDefaults defaults)Constructs a schema for reading based on the given file analysis.TextRecordgenerateForWrite(RecordTokenType recordTokenType, TextConversionDefaults defaults)Constructs a schema for writing based on the given record type.
-
-
-
Method Detail
-
discoverForRead
TextRecord discoverForRead(List<List<String>> rows, boolean containsHeader, TextConversionDefaults defaults)
Constructs a schema for reading based on the given file analysis. The analysis may or may not include a header row, as indicated.- Parameters:
rows- the analyzed rows from a text filecontainsHeader- indicates whether the first row of the analyzed file is a headerdefaults- defaults for the discovered schema- Returns:
- a schema appropriate for reading the file.
-
generateForWrite
TextRecord generateForWrite(RecordTokenType recordTokenType, TextConversionDefaults defaults)
Constructs a schema for writing based on the given record type.- Parameters:
recordTokenType- the record type of the datadefaults- defaults for the discovered schema- Returns:
- a schema appropriate for writing data of the given type
-
-