Hi Brian,

Thanks for the post and your input. I'll add this very useful bit
information to the File Manager User Guide on cwiki. I had no idea what
outputFormat did :).

I'm also just making a note of this - at some point some better command line
operator checking that is needed. I see I erroneously added a second - to
sortBy. sortBy and outputFormat specify a single operator identifier (i.e.
-)

The command executes with two -- for sortBy and outputFormat but produces an
erroneous result.

For completeness, the correct command is:

./query_tool --url http://localhost:9000 --sql -query "SELECT
Observer,Description,Duration,ExperimentID FROM KatFile WHERE
Observer='jasper'" -sortBy Duration -outputFormat
'$Observer,$Description,$Duration,$ExperimentID'

Kind regards,
Thomas

On 4 October 2011 16:56, Brian Foster (Commented) (JIRA) <j...@apache.org>wrote:

>
>    [
> https://issues.apache.org/jira/browse/OODT-325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13120183#comment-13120183]
>
> Brian Foster commented on OODT-325:
> -----------------------------------
>
> the other possibility is the in QueryTool you could make the default value
> of the outputFormat to the SELECT clause and just put $ in front of each
> element... until this is codified the workaround for this issue is to just
> fill out outputFormat manually for each query... for example your query
> above would become:
>
> ./query_tool --url http://localhost:9000 --sql -query "SELECT
> Observer,Description,Duration,ExperimentID FROM KatFile WHERE
> Observer='jasper'" --sortBy Duration --outputFormat
> '$Observer,$Description,$Duration,$ExperimentID'
>
> > QueryTool does not retain query order
> > -------------------------------------
> >
> >                 Key: OODT-325
> >                 URL: https://issues.apache.org/jira/browse/OODT-325
> >             Project: OODT
> >          Issue Type: Improvement
> >          Components: file manager
> >    Affects Versions: 0.3
> >         Environment: OS X 10.7
> > Java version "1.6.0_26"
> >            Reporter: Thomas Bennett
> >            Priority: Minor
> >              Labels: features, newbie
> >             Fix For: 0.4
> >
> >
> > I've ingested some files into a lucene catalog and then use QueryTool
> query the catalog.
> > $ ./query_tool --url http://localhost:9000 --sql -query "SELECT
> Observer,Description,Duration,ExperimentID FROM KatFile WHERE
> Observer='jasper'" --sortBy Duration
> > Which returns:
> > ...
> > jasper,a9909ae6-822b-11e0-a7a1-0060dd4721d8,Target track,637.841571569
> > jasper,47c3a4da-822a-11e0-a7a1-0060dd4721d8,Target track,565.859450817
> > jasper,777b0f34-8224-11e0-a7a1-0060dd4721d8,Target track,80.9798858166
> > ...
> > As you can see the order of the returned values seems to be arbitrary (I
> asked Observer,Description,Duration,ExperimentID and it ruturned
> Observer,ExperimentID,Description,Duration)
>
> --
> This message is automatically generated by JIRA.
> If you think it was sent incorrectly, please contact your JIRA
> administrators:
> https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
> For more information on JIRA, see: http://www.atlassian.com/software/jira
>
>
>


-- 
Thomas Bennett

SKA South Africa

Office :  +2721 506 7341
Mobile : +2779 523 7105
Email  :  tbenn...@ska.ac.za

Reply via email to