All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.marklogic.flux.api.AggregateJsonFilesImporter Maven / Gradle / Ivy

There is a newer version: 1.0.0.ea1
Show newest version
/*
 * 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);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy