~xrg/openobject-doc/trunk-xrg

« back to all changes in this revision

Viewing changes to source/bi/CubeCli/CubeCliIntro.rst

  • Committer: TruongSinh Tran
  • Date: 2009-07-17 18:59:45 UTC
  • Revision ID: truongsinh@vipescoserver-20090717185945-ajjp3zso6xh5jddm
[FIX]private issue

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
.. _CLI-link:
 
2
 
 
3
Command Line Interface
 
4
======================
 
5
 
 
6
Introduction to the cli
 
7
-----------------------
 
8
 
 
9
*The CLI - Command Line Interface*
 
10
 
 
11
Command Line Interface will be the equivalent of psql, but it will be used for MDX queries on the cube.
 
12
As
 
13
 
 
14
::
 
15
 
 
16
 Welcome to OpenObject BI , the interactive terminal. 
 
17
 Communication: XML-RPC.
 
18
 Type: \? for help with MDX commands
 
19
      \e for execute the MDX query
 
20
      \d for quit
 
21
 BI-terp=#
 
22
 
 
23
Currently we can run use cli for testing different queries and it can also be used for running automated test.
 
24
 
 
25
The basic syntax for testing query is: Syntax
 
26
 
 
27
**./tinybi.py -d <<Database Name>> -H localhost -U <<User Name> -W <<Password>> -p <<Port Number>> -s <<Schema Name>> -c <<MDX Query>>**
 
28
 
 
29
One can check all these options by typing
 
30
 
 
31
*$python tinybi.py --help*
 
32
 
 
33
Usage: tinybi.py [options]
 
34
 
 
35
Options:
 
36
 
 
37
::
 
38
 
 
39
 --version             show program's version number and exit
 
40
 -h, --help            show this help message and exit
 
41
 
 
42
.. 
 
43
 
 
44
::
 
45
 
 
46
 General options:
 
47
   -c COMMAND, --command=COMMAND
 
48
                       The query to execute
 
49
   -s SCHEMA, --schema=SCHEMA
 
50
                       The schema to use for the query
 
51
 
 
52
.. 
 
53
 
 
54
::
 
55
 
 
56
 Connection options:
 
57
   -d DATABASE, --database=DATABASE
 
58
                       Database name
 
59
   -H HOSTNAME, --hostname=HOSTNAME
 
60
                       Server hostname
 
61
   -U USERNAME, --username=USERNAME
 
62
                       Username
 
63
   -W PASSWORD, --password=PASSWORD
 
64
                       Password
 
65
   -p PORT, --port=PORT
 
66
                       Server port
 
67
 
 
68
.. 
 
69
 
 
70
:Example:
 
71
 
 
72
./tinybi.py -d "terp" -H localhost -U admin -W admin -p 8069 -s "tinyerp" -c "select {[user].[all]} on rows, {[measures].[credit_limit],[measures].[count]} on columns from res_partner"
 
73
 
 
74
This will give output on CLI as :
 
75
 
 
76
.. csv-table:: 
 
77
   :header: "\ ","credit_limit","count"
 
78
 
 
79
   "All user","[66700.0]","[21.0]"
 
80
 
 
81