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

com.marklogic.flux.api.DelimitedFilesImporter 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 delimited text files from local, HDFS, and S3 locations using
 * Spark's CSV support,
 * and write JSON or XML documents to MarkLogic.
 */
public interface DelimitedFilesImporter extends Executor {

    DelimitedFilesImporter from(Consumer consumer);

    DelimitedFilesImporter from(String... paths);

    DelimitedFilesImporter to(Consumer consumer);

    interface ReadDelimitedFilesOptions extends ReadFilesOptions {
        ReadDelimitedFilesOptions delimiter(String delimiter);

        ReadDelimitedFilesOptions additionalOptions(Map options);

        ReadDelimitedFilesOptions groupBy(String columnName);

        ReadDelimitedFilesOptions aggregateColumns(String newColumnName, String... columns);

        ReadDelimitedFilesOptions encoding(String encoding);

        ReadDelimitedFilesOptions uriIncludeFilePath(boolean value);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy