public class JsonSplitProcessor extends BaseSplitProcessor
SplitProcessor
for JSON files. This class is
not thread safe.Constructor and Description |
---|
JsonSplitProcessor() |
Modifier and Type | Method and Description |
---|---|
void |
configureSplit(Properties properties,
String toFilename)
Configure split.
|
com.toolsverse.etl.connector.json.JsonSplitProcessor.KeyValue<Long,Long> |
split(IoProcessor destination,
File file,
Map<String,String> paths,
String destinationDir,
int max,
boolean includeHeader)
Split the JSON file to files on specified repeating elements
|
com.toolsverse.etl.connector.json.JsonSplitProcessor.KeyValue<Long,Long> |
split(IoProcessor destination,
InputStream stream,
String fileName,
Map<String,String> paths,
String destinationDir,
int max,
boolean includeHeader)
Split the JSON input stream to files on specified repeating elements
|
IoStatus |
split(IoProcessor source,
IoProcessor destination,
String fromFolder,
String toFolder,
String filename)
Split the input stream into multiple files.
|
com.toolsverse.etl.connector.json.JsonSplitProcessor.KeyValue<Long,Long> |
split(IoProcessor destination,
String file,
Map<String,String> paths,
String destinationDir,
int max,
boolean includeHeader)
Split the JSON file to files on specified repeating elements
|
close, getAction, getMaxNumberOfRows, supportsParallel
public void configureSplit(Properties properties, String toFilename) throws IllegalArgumentException
SplitProcessor
configureSplit
in interface SplitProcessor
configureSplit
in class BaseSplitProcessor
properties
- the propertiestoFilename
- the to filenameIllegalArgumentException
- the illegal argument exceptionpublic IoStatus split(IoProcessor source, IoProcessor destination, String fromFolder, String toFolder, String filename) throws Exception
SplitProcessor
source
- IoProcessor, the source IoProcessordestination
- IoProcessor, the destination IoProcessorfromFolder
- the from foldertoFolder
- the to folderfilename
- the filenameException
- in case of any errorpublic com.toolsverse.etl.connector.json.JsonSplitProcessor.KeyValue<Long,Long> split(IoProcessor destination, String file, Map<String,String> paths, String destinationDir, int max, boolean includeHeader) throws Exception
file
- the JSON file pathpaths
- the map of paths to repeating elements, where key is an XPath
like path to repeating element and value is a suffix that
should be used for this element filesdestinationDir
- the output files directory pathmax
- the maximum number of repeating elements to be included into
each fileincludeHeader
- if true, collect everything until repeating element and
include to each split file as a headerException
- in case of any errorpublic com.toolsverse.etl.connector.json.JsonSplitProcessor.KeyValue<Long,Long> split(IoProcessor destination, File file, Map<String,String> paths, String destinationDir, int max, boolean includeHeader) throws Exception
file
- the JSON filepaths
- the map of paths to repeating elements, where key is an XPath
like path to repeating element and value is a suffix that
should be used for this element filesdestinationDir
- the output files directory pathmax
- the maximum number of repeating elements to be included into
each fileincludeHeader
- if true, collect everything until repeating element and
include to each split file as a headerException
- in case of any errorpublic com.toolsverse.etl.connector.json.JsonSplitProcessor.KeyValue<Long,Long> split(IoProcessor destination, InputStream stream, String fileName, Map<String,String> paths, String destinationDir, int max, boolean includeHeader) throws Exception
stream
- the input stream with JSON datafileName
- the name of the output file (no extension)paths
- the map of paths to repeating elements, where key is an XPath
like path to repeating element and value is a suffix that
should be used for this element filesdestinationDir
- the output files directory pathmax
- the maximum number of repeating elements to be included into
each fileincludeHeader
- if true, collect everything until repeating element and
include to each split file as a headerException
- in case of any errorCopyright © 2010-2020 Toolsverse. All Rights Reserved.