|
@@ -1,517 +0,0 @@
|
|
|
-<?xml version="1.0" encoding="UTF-8"?>
|
|
|
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
|
|
-"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
|
|
|
-<book xml:base="../">
|
|
|
- <bookinfo>
|
|
|
- <title>Client Tools Overview</title>
|
|
|
-
|
|
|
- <author>
|
|
|
- <firstname>Boca Raton</firstname>
|
|
|
-
|
|
|
- <surname>Documentation Team</surname>
|
|
|
-
|
|
|
- <affiliation>
|
|
|
- <orgname>Lexis Nexis</orgname>
|
|
|
- </affiliation>
|
|
|
- </author>
|
|
|
-
|
|
|
- <pubdate>Sept. 2011</pubdate>
|
|
|
- </bookinfo>
|
|
|
-
|
|
|
- <chapter id="Command_Line_ECL">
|
|
|
- <title>ECL Plus</title>
|
|
|
-
|
|
|
- <sect1 id="Command_Line_Interface" role="nobrk">
|
|
|
- <title>Command Line Interface</title>
|
|
|
-
|
|
|
- <sect2 id="ECLPlus_exe">
|
|
|
- <title><emphasis>eclplus.exe</emphasis></title>
|
|
|
-
|
|
|
- <para><emphasis role="bold">eclplus </emphasis><emphasis> action=
|
|
|
- owner= user= password= cluster= server= queue= graph= timeout=
|
|
|
- ecl=</emphasis><emphasis> file= format= output= jobname= -debugparam1=
|
|
|
- _applicationparam1=</emphasis><emphasis>
|
|
|
- /variablename1=</emphasis></para>
|
|
|
-
|
|
|
- <para><informaltable colsep="1" frame="all" rowsep="1">
|
|
|
- <tgroup cols="2">
|
|
|
- <colspec align="left" colwidth="125.55pt" />
|
|
|
-
|
|
|
- <colspec />
|
|
|
-
|
|
|
- <tbody>
|
|
|
- <row>
|
|
|
- <entry><emphasis>action=</emphasis></entry>
|
|
|
-
|
|
|
- <entry>One of the following options:
|
|
|
- list|view|dump|delete|abort|query|graph(the default option
|
|
|
- is "query").</entry>
|
|
|
- </row>
|
|
|
-
|
|
|
- <row>
|
|
|
- <entry><emphasis>owner=</emphasis></entry>
|
|
|
-
|
|
|
- <entry>The workunit owner.</entry>
|
|
|
- </row>
|
|
|
-
|
|
|
- <row>
|
|
|
- <entry><emphasis>user=</emphasis></entry>
|
|
|
-
|
|
|
- <entry>The userid.</entry>
|
|
|
- </row>
|
|
|
-
|
|
|
- <row>
|
|
|
- <entry><emphasis>password=</emphasis></entry>
|
|
|
-
|
|
|
- <entry>The password authorizing access for the user.</entry>
|
|
|
- </row>
|
|
|
-
|
|
|
- <row>
|
|
|
- <entry><emphasis>cluster=</emphasis></entry>
|
|
|
-
|
|
|
- <entry>The name of the cluster to use.</entry>
|
|
|
- </row>
|
|
|
-
|
|
|
- <row>
|
|
|
- <entry><emphasis>server=</emphasis></entry>
|
|
|
-
|
|
|
- <entry>The IP address or DNS name of the ECL Watch
|
|
|
- server.</entry>
|
|
|
- </row>
|
|
|
-
|
|
|
- <row>
|
|
|
- <entry><emphasis>queue=</emphasis></entry>
|
|
|
-
|
|
|
- <entry>The name of the job queue.</entry>
|
|
|
- </row>
|
|
|
-
|
|
|
- <row>
|
|
|
- <entry><emphasis>graph=</emphasis></entry>
|
|
|
-
|
|
|
- <entry>The name of graph.</entry>
|
|
|
- </row>
|
|
|
-
|
|
|
- <row>
|
|
|
- <entry><emphasis>timeout=</emphasis></entry>
|
|
|
-
|
|
|
- <entry>Query timeout in seconds (0 for
|
|
|
- asynchronous).</entry>
|
|
|
- </row>
|
|
|
-
|
|
|
- <row>
|
|
|
- <entry><emphasis>ecl=</emphasis></entry>
|
|
|
-
|
|
|
- <entry>The ECL code to execute. Optionally, this may be
|
|
|
- replaced by the name of an input file containing the ECL to
|
|
|
- execute (in the form: @inputfile).</entry>
|
|
|
- </row>
|
|
|
-
|
|
|
- <row>
|
|
|
- <entry><emphasis>file=</emphasis></entry>
|
|
|
-
|
|
|
- <entry>The logical name of the file, or the logical name
|
|
|
- with the starting and ending rows specified (in the form:
|
|
|
- !logicalName[startrow,endrow]).</entry>
|
|
|
- </row>
|
|
|
-
|
|
|
- <row>
|
|
|
- <entry><emphasis>format=</emphasis></entry>
|
|
|
-
|
|
|
- <entry>One of the following options: default | csv | csvh |
|
|
|
- xml | runecl | bin(ary)</entry>
|
|
|
- </row>
|
|
|
-
|
|
|
- <row>
|
|
|
- <entry><emphasis>output=</emphasis></entry>
|
|
|
-
|
|
|
- <entry>The name of the file to output.</entry>
|
|
|
- </row>
|
|
|
-
|
|
|
- <row>
|
|
|
- <entry><emphasis>jobname=</emphasis></entry>
|
|
|
-
|
|
|
- <entry>The name to give the job.</entry>
|
|
|
- </row>
|
|
|
-
|
|
|
- <row>
|
|
|
- <entry><emphasis>pagesize=</emphasis></entry>
|
|
|
-
|
|
|
- <entry>The number of rows per page. If omitted, the default
|
|
|
- is 500.</entry>
|
|
|
- </row>
|
|
|
-
|
|
|
- <row>
|
|
|
- <entry><emphasis>-debugparam=</emphasis></entry>
|
|
|
-
|
|
|
- <entry>Debug parameters to pass on the command line, in the
|
|
|
- form: -debugparam=debugvalue</entry>
|
|
|
- </row>
|
|
|
-
|
|
|
- <row>
|
|
|
- <entry><emphasis>_applicationparam=</emphasis></entry>
|
|
|
-
|
|
|
- <entry>Parameters to pass on the command line, in the form:
|
|
|
- _applicationparam=applicationvalue</entry>
|
|
|
- </row>
|
|
|
-
|
|
|
- <row>
|
|
|
- <entry><emphasis>/variablename= </emphasis></entry>
|
|
|
-
|
|
|
- <entry>Variables to pass on the command line, in the form:
|
|
|
- /variablename=[(int)|(bool)] valueThe default value type is
|
|
|
- string unless int or bool is specified (in parentheses
|
|
|
- preceding the value). The <emphasis>variablename</emphasis>
|
|
|
- is the STORED name of an EXL file in your ECL code.</entry>
|
|
|
- </row>
|
|
|
- </tbody>
|
|
|
- </tgroup>
|
|
|
- </informaltable></para>
|
|
|
-
|
|
|
- <para>The <emphasis role="bold">eclplus</emphasis> executable accepts
|
|
|
- command line parameters to send directly to an ECL execution engine.
|
|
|
- These options can be typed directly on the command line, sent using a
|
|
|
- script or batch file, through an <emphasis role="bold">ini</emphasis>
|
|
|
- file in the same directory as the executable, or any
|
|
|
- combination.</para>
|
|
|
-
|
|
|
- <sect3 id="CT_CLI_eclplus.ini" role="brk">
|
|
|
- <title>eclplus.ini</title>
|
|
|
-
|
|
|
- <para>All the options can be put directly on the command line, or
|
|
|
- placed in a file called eclplus.ini in the same directory as the
|
|
|
- executable. If your operating system is case-sensitive, make sure
|
|
|
- the filename is in lowercase. Options that do not change very often
|
|
|
- can be put in the ini file. For example:</para>
|
|
|
-
|
|
|
- <programlisting>;The values below are examples, you should change them to match your platform deployment
|
|
|
-server=10.150.50.12
|
|
|
-cluster=thor
|
|
|
-queue=mythor
|
|
|
-user=emilykate
|
|
|
-password=password</programlisting>
|
|
|
-
|
|
|
- <para>In all the examples below, we'll assume eclplus.ini has the
|
|
|
- above content.</para>
|
|
|
-
|
|
|
- <para><informaltable colsep="1" frame="all" rowsep="1">
|
|
|
- <tgroup cols="2">
|
|
|
- <colspec colwidth="49.50pt" />
|
|
|
-
|
|
|
- <colspec />
|
|
|
-
|
|
|
- <tbody>
|
|
|
- <row>
|
|
|
- <entry><graphic fileref="images/caution.png" scale="noin"
|
|
|
- xml:base="../../" /></entry>
|
|
|
-
|
|
|
- <entry>We do not recommend storing your password in the
|
|
|
- ini file (which is clear text). The password is included
|
|
|
- in the ini file for these examples to simplify the example
|
|
|
- code.</entry>
|
|
|
- </row>
|
|
|
- </tbody>
|
|
|
- </tgroup>
|
|
|
- </informaltable></para>
|
|
|
- </sect3>
|
|
|
-
|
|
|
- <sect3 id="CT_RunningQueriesBatchMode">
|
|
|
- <title>Running queries in batch mode</title>
|
|
|
-
|
|
|
- <para>Batch mode queries are executed using the
|
|
|
- <emphasis>ecl=</emphasis> option, in any of its three forms. In the
|
|
|
- first form you simply put your ECL code on the command line
|
|
|
- itself:</para>
|
|
|
-
|
|
|
- <programlisting>eclplus ecl=1+1
|
|
|
- // Result = 2</programlisting>
|
|
|
-
|
|
|
- <para>In the second form, your ECL code is in an input file. For
|
|
|
- example, assume you have a text file called dataset.txt, which
|
|
|
- contains the following ECL code:</para>
|
|
|
-
|
|
|
- <programlisting>myrec := record
|
|
|
-string10 firstname,
|
|
|
-string10 lastname
|
|
|
-end;
|
|
|
-ds := dataset([{'Yanrui', 'Ma'}, {'Richard', 'Taylor'},
|
|
|
-{'Richard', 'Chapman'}], myrec);
|
|
|
-output(ds, ,'testdata::namesdb');</programlisting>
|
|
|
-
|
|
|
- <para>Then if you run:</para>
|
|
|
-
|
|
|
- <programlisting>eclplus @dataset.txt</programlisting>
|
|
|
-
|
|
|
- <para>A dataset will be created and the result will be written to
|
|
|
- the thor file testdata::namesdb.</para>
|
|
|
-
|
|
|
- <para>If also have a text file called datasetquery.txt
|
|
|
- containing:</para>
|
|
|
-
|
|
|
- <programlisting>myrec := record
|
|
|
-string10 firstname,
|
|
|
-string10 lastname
|
|
|
-end;
|
|
|
-ds1 := dataset('testdata::namesdb', myrec, thor);
|
|
|
-output(ds1);</programlisting>
|
|
|
-
|
|
|
- <para>then run:</para>
|
|
|
-
|
|
|
- <programlisting>eclplus @datasetquery.txt</programlisting>
|
|
|
-
|
|
|
- <para>You'll get:</para>
|
|
|
-
|
|
|
- <programlisting>firstname lastname
|
|
|
-Yanrui Ma
|
|
|
-Richard Taylor
|
|
|
-Richard Chapman</programlisting>
|
|
|
- </sect3>
|
|
|
-
|
|
|
- <sect3 id="CT_CLI_WorkunitManipulation">
|
|
|
- <title>Workunit manipulation</title>
|
|
|
-
|
|
|
- <para>A workunit is a data structure that is passed among eclplus,
|
|
|
- daliserver, and eclccserver. It contains real-time information about
|
|
|
- the query, so you can control the process of a query by manipulating
|
|
|
- the workunit.</para>
|
|
|
- </sect3>
|
|
|
-
|
|
|
- <sect3 id="CT_CLI_ListAllWorkunits">
|
|
|
- <title>List all work units</title>
|
|
|
-
|
|
|
- <para>To list all work units:</para>
|
|
|
-
|
|
|
- <programlisting>eclplus action=list</programlisting>
|
|
|
-
|
|
|
- <para></para>
|
|
|
-
|
|
|
- <para>The output looks like:</para>
|
|
|
-
|
|
|
- <programlisting>WUID OWNER JOBNAME STATUS
|
|
|
-W20090226-100258-85132143 yma dataset.txt completed
|
|
|
-W20090226-100958-85552898 yma datasetquery.txt completed</programlisting>
|
|
|
-
|
|
|
- <para></para>
|
|
|
-
|
|
|
- <para></para>
|
|
|
-
|
|
|
- <para>Each workunit has a WUID (WorkUnit IDentifier), owner, jobname
|
|
|
- and status. You can see that the jobname is simply the filename that
|
|
|
- contains the query, but you can specify the jobname by your self,
|
|
|
- like this:</para>
|
|
|
-
|
|
|
- <programlisting>eclplus jobname=myquery1 @datasetquery.txt</programlisting>
|
|
|
- </sect3>
|
|
|
-
|
|
|
- <sect3 id="CT_CLI_ViewResultofWorkunit">
|
|
|
- <title>View the result of a certain workunit</title>
|
|
|
-
|
|
|
- <para>You can look at specific workunit results, like this:</para>
|
|
|
-
|
|
|
- <programlisting>eclplus action=view wuid=
|
|
|
- W20090226-100958-85552898</programlisting>
|
|
|
-
|
|
|
- <para>The output will look like:</para>
|
|
|
-
|
|
|
- <programlisting>firstname lastname
|
|
|
-Yanrui Ma
|
|
|
-Richard Taylor
|
|
|
-Richard Chapman</programlisting>
|
|
|
- </sect3>
|
|
|
-
|
|
|
- <sect3 id="CT_CLI_DumpWorkunit">
|
|
|
- <title>Dump a workunit</title>
|
|
|
-
|
|
|
- <para>If you want to get all the details describing a workunit, use
|
|
|
- the dump option for the action parameter:</para>
|
|
|
-
|
|
|
- <programlisting>eclplus action=dump wuid= W20090226-100958-85552898</programlisting>
|
|
|
-
|
|
|
- <para>See the Workunit Dump section below for the result.</para>
|
|
|
- </sect3>
|
|
|
-
|
|
|
- <sect3 id="CT_CLI_SeeTheThorGraph">
|
|
|
- <title>See the thor graph of a workunit:</title>
|
|
|
-
|
|
|
- <para>This action returns the XML data for one or more workunit
|
|
|
- graphs.</para>
|
|
|
-
|
|
|
- <programlisting>eclplus action=graph graph=graph1 wuid=W20090226-100958-85552898</programlisting>
|
|
|
-
|
|
|
- <para>Graph name must be supplied in the graph= parameter.</para>
|
|
|
- </sect3>
|
|
|
-
|
|
|
- <sect3 id="CT_CLI_AbortWorkunit">
|
|
|
- <title>Aborting a workunit</title>
|
|
|
-
|
|
|
- <para>If a query is taking an usually long time and you doubt
|
|
|
- something is wrong, you can abort it by:</para>
|
|
|
-
|
|
|
- <programlisting>eclplus action=abort wuid= W20090226-100958-85552898</programlisting>
|
|
|
-
|
|
|
- <para>You can use list to find out the wuid the workunit and use
|
|
|
- abort to abort it.</para>
|
|
|
- </sect3>
|
|
|
-
|
|
|
- <sect3 id="CT_CLI_Timeout">
|
|
|
- <title>Timeout</title>
|
|
|
-
|
|
|
- <para>Before you run a query, if you know the query is going to take
|
|
|
- a long time, you can specify a timeout, then your eclplus will
|
|
|
- return when it reaches the timeout, and the query will run in the
|
|
|
- background.</para>
|
|
|
-
|
|
|
- <para>For example:</para>
|
|
|
-
|
|
|
- <programlisting>eclplus @datasetquery.txt timeout=0</programlisting>
|
|
|
-
|
|
|
- <para>eclplus will return immediately.</para>
|
|
|
-
|
|
|
- <programlisting>eclplus @datasetquery.txt timeout=2</programlisting>
|
|
|
-
|
|
|
- <para>eclplus will return in 2 seconds.</para>
|
|
|
-
|
|
|
- <para>You can list/view the workunit associated with the query to
|
|
|
- monitor its status.</para>
|
|
|
- </sect3>
|
|
|
-
|
|
|
- <sect3 id="CT_CLI_OutputFormat">
|
|
|
- <title>Output format</title>
|
|
|
-
|
|
|
- <para>By default, the result displays on the screen. You can direct
|
|
|
- it to a file, by using the output option:</para>
|
|
|
-
|
|
|
- <programlisting>eclplus @datasetquery.txt output=o1.txt
|
|
|
-cat o1.txt
|
|
|
-firstname lastname
|
|
|
-Yanrui Ma
|
|
|
-Richard Taylor
|
|
|
-Richard Chapman</programlisting>
|
|
|
-
|
|
|
- <para>Also, you may specify the following output formats:</para>
|
|
|
- </sect3>
|
|
|
-
|
|
|
- <sect3 id="CT_CLI_CSV">
|
|
|
- <title>csv</title>
|
|
|
-
|
|
|
- <programlisting>eclplus @datasetquery.txt format=csv
|
|
|
-[QUERY 0]
|
|
|
-"Yanrui ","Ma "
|
|
|
-"Richard ","Taylor "
|
|
|
-"Richard ","Chapman "</programlisting>
|
|
|
- </sect3>
|
|
|
-
|
|
|
- <sect3 id="CT_CLI_CSVH">
|
|
|
- <title>csvh</title>
|
|
|
-
|
|
|
- <programlisting>eclplus @datasetquery.txt format=csvh
|
|
|
-[QUERY 0]
|
|
|
-"firstname","lastname"
|
|
|
-"Yanrui ","Ma "
|
|
|
-"Richard ","Taylor "
|
|
|
-"Richard ","Chapman "</programlisting>
|
|
|
- </sect3>
|
|
|
-
|
|
|
- <sect3 id="CT_CLI_RAW">
|
|
|
- <title>raw</title>
|
|
|
-
|
|
|
- <programlisting>eclplus @datasetquery.txt format=raw
|
|
|
-Yanrui Ma
|
|
|
-Richard Taylor
|
|
|
-Richard Chapman</programlisting>
|
|
|
- </sect3>
|
|
|
-
|
|
|
- <sect3 id="CT_CLI_RUNECL">
|
|
|
- <title>runecl</title>
|
|
|
-
|
|
|
- <programlisting>eclplus @datasetquery.txt format=runecl
|
|
|
-[QUERY 0]
|
|
|
-[0]
|
|
|
-firstname -> Yanrui
|
|
|
-lastname -> Ma
|
|
|
-[1]
|
|
|
-firstname -> Richard
|
|
|
-lastname -> Taylor
|
|
|
-[2]
|
|
|
-firstname -> Richard
|
|
|
-lastname -> Chapman</programlisting>
|
|
|
- </sect3>
|
|
|
-
|
|
|
- <sect3 id="CT_CLI_Bin-ary-">
|
|
|
- <title>bin(ary)</title>
|
|
|
-
|
|
|
- <programlisting>eclplus @datasetquery.txt format=bin
|
|
|
-Yanrui Ma Richard Taylor Richard Chapman</programlisting>
|
|
|
- </sect3>
|
|
|
-
|
|
|
- <sect3 id="CT_CLI_WorkUnitDump">
|
|
|
- <title>Workunit Dump</title>
|
|
|
-
|
|
|
- <para>A Workunit dump is an XML representation of every piece of
|
|
|
- data in the workunit. This contains all the information that you
|
|
|
- could discover about the workunit by using ECL Watch.</para>
|
|
|
-
|
|
|
- <para>The following workunit dump came from a simple COUNT(person)
|
|
|
- query in the Training environment:</para>
|
|
|
-
|
|
|
- <programlisting><W20110615-160604 agentPID="4162" agentSession="4296042782" cloneable="1"
|
|
|
- clusterName="thor" codeVersion="138" isClone="1" scope="hpccdemo"
|
|
|
- state="completed" submitID="hpccdemo"
|
|
|
- token="X1lUMJ6oacON/1anTHTQW1JVHr1bbY8EWTSJhlDOrtYxmD13Z5ly4Qd26sEYVtxhW">
|
|
|
- <Action>run</Action>
|
|
|
- <Debug>
|
|
|
- <applyinstantecltransformations>1</applyinstantecltransformations>
|
|
|
- <applyinstantecltransformationslimit>100</applyinstantecltransformationslimit>
|
|
|
- <created_by>ws_workunits</created_by>
|
|
|
- <created_for>hpccdemo</created_for>
|
|
|
- <eclagentlog>//192.168.237.132/var/log/HPCCSystems/myeclagent/eclagent.06_15_11.log
|
|
|
- </eclagentlog>
|
|
|
- <targetclustertype>hthor</targetclustertype>
|
|
|
- </Debug>
|
|
|
- <Query fetchEntire="1">
|
|
|
- <Associated>
|
|
|
- <File crc="701142319" filename="libW20110615-160604.so" type="dll"/>
|
|
|
- </Associated>
|
|
|
- <Text>
|
|
|
- <Archive build="community_3.0.0" eclVersion="3.0.0"> <Query
|
|
|
- originalFilename="C:\DOCUME~1\Hpccdemo\LOCALS~1\Temp\TFR2CE.tmp">
|
|
|
- OUTPUT(&apos;Hello World&apos;); </Query> </Archive>
|
|
|
- </Text>
|
|
|
- </Query>
|
|
|
- <resultLimit>100</resultLimit>
|
|
|
- <Results>
|
|
|
- <Result fetchEntire="1" name="Result 1" sequence="0" status="calculated">
|
|
|
- <rowCount>1</rowCount>
|
|
|
- <SchemaRaw xsi:type="SOAP-ENC:base64"> UmVzdWx0XzEABPH///8BYXNjaWkAAWFzY2lpAAAYAAAAAA==
|
|
|
- </SchemaRaw>
|
|
|
- <totalRowCount>1</totalRowCount>
|
|
|
- <Value xsi:type="SOAP-ENC:base64"> CwAAAEhlbGxvIFdvcmxk </Value>
|
|
|
- </Result>
|
|
|
- </Results>
|
|
|
- <TimeStamps>
|
|
|
- <TimeStamp application="workunit">
|
|
|
- <Created ts="1308153964"> 2011-06-15T16:06:04Z </Created>
|
|
|
- </TimeStamp>
|
|
|
- <TimeStamp application="EclAgent" instance="localhost.localdom">
|
|
|
- <Started ts="1308153971"> 2011-06-15T16:06:11Z </Started>
|
|
|
- </TimeStamp>
|
|
|
- <TimeStamp application="EclAgent" instance="localhost.localdom">
|
|
|
- <Finished ts="1308153971"> 2011-06-15T16:06:11Z </Finished>
|
|
|
- </TimeStamp>
|
|
|
- </TimeStamps>
|
|
|
- <Timings>
|
|
|
- <Timing count="1" duration="1" max="1308040" name="WorkUnit_lockRemote"/>
|
|
|
- <Timing count="1" duration="6" max="6577412" name="SDS_Initialize"/>
|
|
|
- <Timing count="1" duration="0" max="704338" name="Environment_Initialize"/>
|
|
|
- <Timing count="1" duration="16" max="16414003" name="Process"/>
|
|
|
- </Timings>
|
|
|
- <Workflow>
|
|
|
- <Item mode="normal" state="done" type="normal" wfid="1">
|
|
|
- <Schedule/>
|
|
|
- </Item>
|
|
|
- </Workflow>
|
|
|
-</W20110615-160604></programlisting>
|
|
|
- </sect3>
|
|
|
- </sect2>
|
|
|
- </sect1>
|
|
|
- </chapter>
|
|
|
-</book>
|