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.
* @deprecated since 1.1.2; use {@code jsonLines()} instead.
*/
@SuppressWarnings("java:S1133") // Telling Sonar we don't need a reminder to remove this some day.
@Deprecated(since = "1.1.2", forRemoval = true)
ReadJsonFilesOptions jsonLines(boolean value);
/**
* Call this to read JSON Lines files. Otherwise, defaults to reading files that either contain an array of
* JSON objects or a single JSON object.
*
* @since 1.1.2
*/
ReadJsonFilesOptions jsonLines();
/**
* Call this to read JSON Lines files "as is", without any alteration to the documents associated with each
* line.
*
* @since 1.1.2
*/
ReadJsonFilesOptions jsonLinesRaw();
ReadJsonFilesOptions encoding(String encoding);
ReadJsonFilesOptions uriIncludeFilePath(boolean value);
ReadJsonFilesOptions additionalOptions(Map additionalOptions);
}
AggregateJsonFilesImporter from(Consumer consumer);
AggregateJsonFilesImporter from(String... paths);
AggregateJsonFilesImporter to(Consumer consumer);
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy