SprayJson

STD.File.SprayJson( sourceIP , sourcepath , [ maxrecordsize ] , srcRowPath , [ srcEncoding ] , destinationgroup, destinationlogicalname [ timeout ] [ espserverIPport ] [ maxConnections ] [ allowoverwrite ] [ replicate ] [ compress ] , [failIfNoSourceFile], [expireDays] , [ dfuServerQueue] , [ noSplit], [noCommon ],[ sourcePlane ],[ destinationNumParts ])

dfuwuid := STD.File.fSprayJson( sourceIP , sourcepath, [ maxrecordsize ] , srcRowPath , [ srcEncoding ] ,destinationgroup, destinationlogicalname , [ timeout ] , [ espserverIPport ] , [ maxConnections ] , [ allowoverwrite ] , [ replicate ] , [ compress ] , [failIfNoSourceFile], [expireDays] , [ dfuServerQueue] , [ noSplit], [noCommon ],[ sourcePlane ],[ destinationNumParts ])

sourceIPA null-terminated string containing the IP address or hostname of the Dropzone where the file is located.
sourcepathA null-terminated string containing the path and name of the file.
maxrecordsizeOptional. An integer containing the maximum size of the records in the file. If omitted, the default is 8192.
sourceRowPathThe JSON path that is used to delimit records in the source file. Required.
srcEncodingOptional. A null-terminated string containing the encoding (utf8,utf8n,utf16be,utf16le,utf32be,utf32le). If omitted, the default is 'utf8'
destinationgroupA null-terminated string containing the name of the group to distribute the file across.
destinationlogicalnameA null-terminated string containing the logical name of the file to create.
timeoutOptional. An integer value indicating the timeout setting. If omitted, the default is -1. If set to zero (0), execution control returns immediately to the ECL workunit without waiting for the DFU workunit to complete.
espserverIPportOptional. This should almost always be omitted, which then defaults to the value contained in the lib_system.ws_fs_server attribute. When not omitted, it should be a null-terminated string containing the protocol, IP, port, and directory, or the DNS equivalent, of the ESP server program. This is usually the same IP and port as ECL Watch, with "/FileSpray" appended.
maxConnectionsOptional. An integer specifying the maximum number of connections. If omitted, the default is -1, which indicates the system chooses a suitable default based on the size of the cluster.
allowoverwriteOptional. A boolean TRUE or FALSE flag indicating whether to allow the new file to overwrite an existing file of the same name. If omitted, the default is FALSE.
replicateOptional. A boolean TRUE or FALSE flag indicating whether to replicate the new file. If omitted, the default is FALSE.
compressOptional. A boolean TRUE or FALSE flag indicating whether to compress the new file. If omitted, the default is FALSE.
failIfNoSourceFileOptional. A boolean TRUE or FALSE flag indicating whether a missing file triggers a failure. If omitted, the default is FALSE.
expireDaysOptional. Specifies the file is a temporary file to be automatically deleted after the specified number of days since the file was read. If omitted, the default is -1 (never expires). If set to 0, the file is automatically deleted when it reaches the threshold set in Sasha Server's expiryDefault setting.
dfuServerQueueName of target DFU Server queue. Default is '' (empty) for the first DFU queue in the environment.
noSplitOptional. A boolean TRUE or FALSE flag indicating to not split a file part to multiple target parts. Default is FALSE.
noCommonOptional. A boolean TRUE or FALSE flag for "commoning up" of pull or push processes on same host. Set to FALSE to "common up" the operation on same host. Default can be set in configuration. Use GetNoCommonDefault to retrieve default setting. The value of this parameter can have a significant impact on performance.
sourcePlaneThe name of the landing zone containing the file
destinationNumPartsOverride the number of parts to be created when spraying. The default is 0 which means it will create the same number of parts as the target cluster.
dfuwuidThe attribute name to receive the null-terminated string containing the DFU workunit ID (DFUWUID) generated for the job.
username Optional. String containing a username to use for authenticated access to the ESP process; an empty string value indicates that no user authentication is required. If omitted, the default is an empty string.
userPw: Optional. String containing the password to be used with the user cited in the username argument; if username is empty then this is ignored. If omitted, the default is an empty string.
Return: fSprayJson returns a null-terminated string containing the DFU workunit ID (DFUWUID).

The SprayJson function takes a well-formed JSON file from a landing zone and distributes it across the nodes of the destination cluster, producing a well-formed JSON file on each node.

Example:

STD.File.SprayJson('10.150.50.14','/var/lib/HPCCSystems/mydropzone/colors.json',,
      '/',,'mythor','examples::colors.json',-1,
      'http://10.150.50.12:8010/FileSpray');