4
.. i18n: Command Line Interface
5
.. i18n: ======================
10
Command Line Interface
11
======================
13
.. i18n: Introduction to the cli
14
.. i18n: -----------------------
17
Introduction to the cli
18
-----------------------
20
.. i18n: *The CLI - Command Line Interface*
23
*The CLI - Command Line Interface*
25
.. i18n: Command Line Interface will be the equivalent of psql, but it will be used for MDX queries on the cube.
29
Command Line Interface will be the equivalent of psql, but it will be used for MDX queries on the cube.
34
.. i18n: Welcome to OpenObject BI , the interactive terminal.
35
.. i18n: Communication: XML-RPC.
36
.. i18n: Type: \? for help with MDX commands
37
.. i18n: \e for execute the MDX query
44
Welcome to OpenObject BI , the interactive terminal.
45
Communication: XML-RPC.
46
Type: \? for help with MDX commands
47
\e for execute the MDX query
51
.. i18n: Currently we can run use cli for testing different queries and it can also be used for running automated test.
54
Currently we can run use cli for testing different queries and it can also be used for running automated test.
56
.. i18n: The basic syntax for testing query is: Syntax
59
The basic syntax for testing query is: Syntax
61
.. i18n: **./tinybi.py -d <<Database Name>> -H localhost -U <<User Name> -W <<Password>> -p <<Port Number>> -s <<Schema Name>> -c <<MDX Query>>**
64
**./tinybi.py -d <<Database Name>> -H localhost -U <<User Name> -W <<Password>> -p <<Port Number>> -s <<Schema Name>> -c <<MDX Query>>**
66
.. i18n: One can check all these options by typing
69
One can check all these options by typing
71
.. i18n: *$python tinybi.py --help*
74
*$python tinybi.py --help*
76
.. i18n: Usage: tinybi.py [options]
79
Usage: tinybi.py [options]
88
.. i18n: --version show program's version number and exit
89
.. i18n: -h, --help show this help message and exit
94
--version show program's version number and exit
95
-h, --help show this help message and exit
104
.. i18n: General options:
105
.. i18n: -c COMMAND, --command=COMMAND
106
.. i18n: The query to execute
107
.. i18n: -s SCHEMA, --schema=SCHEMA
108
.. i18n: The schema to use for the query
114
-c COMMAND, --command=COMMAND
116
-s SCHEMA, --schema=SCHEMA
117
The schema to use for the query
126
.. i18n: Connection options:
127
.. i18n: -d DATABASE, --database=DATABASE
128
.. i18n: Database name
129
.. i18n: -H HOSTNAME, --hostname=HOSTNAME
130
.. i18n: Server hostname
131
.. i18n: -U USERNAME, --username=USERNAME
133
.. i18n: -W PASSWORD, --password=PASSWORD
135
.. i18n: -p PORT, --port=PORT
142
-d DATABASE, --database=DATABASE
144
-H HOSTNAME, --hostname=HOSTNAME
146
-U USERNAME, --username=USERNAME
148
-W PASSWORD, --password=PASSWORD
163
.. i18n: ./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"
166
./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"
168
.. i18n: This will give output on CLI as :
171
This will give output on CLI as :
173
.. i18n: .. csv-table::
174
.. i18n: :header: "\ ","credit_limit","count"
176
.. i18n: "All user","[66700.0]","[21.0]"
180
:header: "\ ","credit_limit","count"
182
"All user","[66700.0]","[21.0]"