Package com.illumon.iris.importers.util
Class CsvImport
java.lang.Object
com.illumon.iris.importers.util.ImportBase
com.illumon.iris.importers.util.CsvImport
Tools for programmatically executing CSV batch imports.
-
Field Summary
FieldsFields inherited from class com.illumon.iris.importers.util.ImportBase
destinationDirectory, destinationPartitions, namespace, outputMode, schemaService, table -
Method Summary
Modifier and TypeMethodDescriptionstatic CsvImportBuilderDeprecated.static CsvImportBuilderCreates a newCsvImportBuilderto configure an CSV importer that pulls data from a set of files on disk.static CsvImportBuilderfromStream(String namespace, String table, InputStream stream) Creates a newCsvImportBuilderto configure an CSV importer that pulls data from a specific InputStream.longrun()Executes a CSV batch import as configured for theCsvImportobject.Methods inherited from class com.illumon.iris.importers.util.ImportBase
getFileList, getImportTableWriterFactory, getSourceFiles
-
Field Details
-
log
public static final com.fishlib.io.logger.Logger log
-
-
Method Details
-
builder
@Deprecated @ScriptApi public static CsvImportBuilder builder(@NotNull String namespace, @NotNull String table) Deprecated.usefromFiles(String, String)instead.Creates a newCsvImportBuilderto configure an CSV importer that pulls data from a set of files on disk.- Parameters:
namespace- The String name of the namespace into which data will be imported.table- The String name of the table into which data will be imported.- Returns:
- A new
CsvImportBuilder.
-
fromFiles
@ScriptApi public static CsvImportBuilder fromFiles(@NotNull String namespace, @NotNull String table) Creates a newCsvImportBuilderto configure an CSV importer that pulls data from a set of files on disk.- Parameters:
namespace- The String name of the namespace into which data will be imported.table- The String name of the table into which data will be imported.- Returns:
- A new
CsvImportBuilder.
-
fromStream
@ScriptApi public static CsvImportBuilder fromStream(@NotNull String namespace, @NotNull String table, @NotNull InputStream stream) Creates a newCsvImportBuilderto configure an CSV importer that pulls data from a specific InputStream.- Parameters:
namespace- The String name of the namespace into which data will be imported.table- The String name of the table into which data will be imported.- Returns:
- A new
CsvImportBuilder.
-
run
Executes a CSV batch import as configured for theCsvImportobject.- Specified by:
runin classImportBase- Returns:
- A long of the number of rows imported.
- Throws:
IOException- If the import cannot be executed or fails during processing.
-
fromFiles(String, String)instead.