All docs This doc

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagexml
titlesplitFile
<fileconnector.splitFile>
    <source>{$ctx:source}</source>
    <destination>{$ctx:destination}</destination>
    <chunkSize>{$ctx:chunkSize}</chunkSize>
	<numberOfLines>{$ctx:numberOfLines}</numberOfLines>
	<xpathExpression>{$ctx:xpathExpression}</xpathExpression> 
</fileconnector.splitFile>

...

  • source: The location of the file.

  • destination: The location to write the files.

  • chunkSize: The chunk size in bytes to split the file. This is to split the file based on chunk size. You should provide either chunkSize or numberOfLines to split the file.

  • numberOfLines: The number of line per file. This is to split the file based on the number of lines. You should provide either chunkSize or numberOfLines to split the file.
  • xpathExpression: Defines a pattern in order to select a set of nodes in xml document

Sample request

Following is a sample REST/JSON request that can be handled by the splitFile operation.

Code Block
languagexml
titleSample Request for splitFile
{
     "source":"/home/vive/Desktop/file/outTest/sample.txt",
	 "destination":"/home/vive/Desktop/file/outTest/",
	 "chunkSize":"4096",
     "xpathExpression":"//products/product"
} 

Anchor
mergeFiles
mergeFiles
Merging multiple chunks into a file

...