Local process Plugin - Converters¶
From file to query.shell¶
Category-name : query
What ?
This query converter will convert a file
type resource to a query.shell
type resource.
CONVERT {resourceToConvert<Res:file>} TO query.shell (query) AS {converted<Res:query.shell>} [ USING {config<Res:file>} ] |
> Input :
{resourceToConvert<Res:file>}
: The name of the file which includes one or several shell command lines. Commands can be on one line separated by the character ‘;’ or on several lines (in this case the ‘;’ is optional) and comments beginning with ‘#’ are authorized.
{config<Res:file> (Optional)}
: The name of the resource which references a configuration file which contains only one key / value :
- ‘timeout : An integer that represents time in milliseconds. It’s the time to wait before the command execution times out. It can also be defined via an inline instruction : $(timeout : …).
- ‘streamlength : An integer that represents the stream length (number of characters). An option “full” allows to have the entire stream. It can also be defined via an inline instruction : $(streamlength : …). Streamlength property is available since 1.8.0 version.
> Output :
{converted<Res:query.shell>}
: The name of the converted resource (query.shell
type resource).
Example :
LOAD shell/shell_command_03.txt AS command.file CONVERT command.file TO query.shell USING $(timeout:15000, streamlength:600) AS commandLine LOAD shell/shell_command_03.txt AS command.file CONVERT command.file TO query.shell USING $(streamlength:full) AS commandLine |