Interface JsonLoader
- All Known Implementing Classes:
JsonLoaderImpl,KafkaJsonLoader
public interface JsonLoader
Enhanced second-generation JSON loader which takes an input
source and creates a series of record batches using the
ResultSetLoader abstraction.-
Field Details
-
JSON_MODE
Column property specific to the JSON loader. Mode for reading Varchar columns from JSON. One of:JSON_TYPED_MODE: Read using normal typing rules (default).JSON_TEXT_MODE: Like the JSON format plugin's "all-text mode", but for a single column. That JSON field is read as text regardless of the actual value. Applies only to scalars.JSON_LITERAL_MODE: Causes the field, and all its children, to be read as literal JSON: the values are returned as a valid JSON string.- See Also:
-
JSON_TEXT_MODE
- See Also:
-
JSON_TYPED_MODE
- See Also:
-
JSON_LITERAL_MODE
- See Also:
-
-
Method Details
-
readBatch
boolean readBatch()Read one batch of row data.- Returns:
trueif at least one record was loaded,falseif EOF.- Throws:
RuntimeException- for unexpected errors, most often due to code errors
-
close
void close()Releases resources held by this class including the input stream. Does not close the result set loader passed into this instance.
-