6
Introduction to the cli
7
-----------------------
9
*The CLI - Command Line Interface*
11
Command Line Interface will be the equivalent of psql, but it will be used for MDX queries on the cube.
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
23
Currently we can run use cli for testing different queries and it can also be used for running automated test.
25
The basic syntax for testing query is: Syntax
27
**./tinybi.py -d <<Database Name>> -H localhost -U <<User Name> -W <<Password>> -p <<Port Number>> -s <<Schema Name>> -c <<MDX Query>>**
29
One can check all these options by typing
31
*$python tinybi.py --help*
33
Usage: tinybi.py [options]
39
--version show program's version number and exit
40
-h, --help show this help message and exit
47
-c COMMAND, --command=COMMAND
49
-s SCHEMA, --schema=SCHEMA
50
The schema to use for the query
57
-d DATABASE, --database=DATABASE
59
-H HOSTNAME, --hostname=HOSTNAME
61
-U USERNAME, --username=USERNAME
63
-W PASSWORD, --password=PASSWORD
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"
74
This will give output on CLI as :
77
:header: "\ ","credit_limit","count"
79
"All user","[66700.0]","[21.0]"