com.marklogic.flux.api.AggregateJsonFilesImporter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of flux-api Show documentation
Show all versions of flux-api Show documentation
Flux API for data movement with MarkLogic
/*
* Copyright © 2024 MarkLogic Corporation. All Rights Reserved.
*/
package com.marklogic.flux.api;
import java.util.Map;
import java.util.function.Consumer;
/**
* Read either JSON Lines files or files containing arrays of JSON objects from local, HDFS, and S3 locations using
* Spark's JSON support,
* and write each object as a JSON document to MarkLogic.
*/
public interface AggregateJsonFilesImporter extends Executor {
interface ReadJsonFilesOptions extends ReadFilesOptions {
/**
* @param value set to true to read JSON Lines files. Defaults to reading files that either contain an array
* of JSON objects or a single JSON object.
*/
ReadJsonFilesOptions jsonLines(boolean value);
ReadJsonFilesOptions encoding(String encoding);
ReadJsonFilesOptions uriIncludeFilePath(boolean value);
ReadJsonFilesOptions additionalOptions(Map additionalOptions);
}
AggregateJsonFilesImporter from(Consumer consumer);
AggregateJsonFilesImporter from(String... paths);
AggregateJsonFilesImporter to(Consumer consumer);
}