Menu

#40 WHERE clause on the command line is not supported

v1.0_(example)
open
nobody
None
5
2019-10-25
2019-10-25
Anonymous
No

When I want to extract an extraction model over command line, the extraction works as long as I don't use a where clause. At the moment I type a where clause, it acts like I've put a wrong parameter and prints out the help. Even if I copy and paste the command line as I get it in the export dialog of the GUI. The same where clause works well with the GUI. I used the parameter as described:

jailer.sh extract ... -where 'field = 3' ...

I tried this with 9.1.1 and also the latest version of jailer.

A.T.

Discussion

  • Anonymous

    Anonymous - 2019-10-25

    Sorry, the parameter "extract" should be "export" of course.

     
  • Ralf Wisser

    Ralf Wisser - 2019-10-25

    I can not reproduce the error. Are you sure the shell does not do any character substitutions?
    What does this give?

    echo jailer.sh export -where ...

     
    • Anonymous

      Anonymous - 2019-10-25

      I found out, that the parameter where works but in the where clause itself should be no blanks. This means that the following statement will not work:

      jailer.sh export -where "field = 3" ...
      

      But if you write it without spaces, it works:

      jailer.sh export -where "field=3" ...
      

      I'm using Linux and execute jailer from a bash shell.

      A.T.

       
      • Ralf Wisser

        Ralf Wisser - 2019-10-25

        That's strange. The arguments should not be split if they are in quotation marks. ( because in jailer.sh the parameter passing takes place via "$@")

        Are you sure that a bash is used and no other shell?

         
        • Anonymous

          Anonymous - 2019-10-25

          I think I found the error. I installed jailer in the directory /usr/local/jailer by unzipping the ZIP file. Then I created in the directory /usr/local/bin a small wrapper script to be able to call jailer with it's full path. This saved me the need to change my PATH environment variable.

          #!/bin/bash
          exec /usr/local/jailer/jailer.sh $@
          

          As you can see, I forgot the quotes around the $@ and this caused the problem. The problem was my fault. Sorry to bother you with it.

          A.T.

           
          • Ralf Wisser

            Ralf Wisser - 2019-10-25

            No problem. Shell scripting is sometimes tricky.

             

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB