Github user mhthanh commented on a diff in the pull request:
https://github.com/apache/tajo/pull/156#discussion_r18077494
--- Diff: tajo-docs/src/main/sphinx/tsql/meta_command.rst ---
@@ -0,0 +1,313 @@
+*********************************
+Meta Commands
+*********************************
+
+
+In tsql, anything command that begins with an unquoted backslash ('\') is
a tsql meta-command that is processed by tsql itself.
+
+In the current implementation, there are meta commands as follows: ::
+
+ default> \?
+
+
+ General
+ \copyright show Apache License 2.0
+ \version show Tajo version
+ \? show help
+ \? [COMMAND] show help of a given command
+ \help alias of \?
+ \q quit tsql
+
+
+ Informational
+ \l list databases
+ \c show current database
+ \c [DBNAME] connect to new database
+ \d list tables
+ \d [TBNAME] describe table
+ \df list functions
+ \df NAME describe function
+
+
+ Tool
+ \! execute a linux shell command
+ \dfs execute a dfs command
+ \admin execute tajo admin command
+
+
+ Variables
+ \set [[NAME] [VALUE] set session variable or list session variables
+ \unset NAME unset session variable
+
+
+ Documentations
+ tsql guide http://tajo.apache.org/docs/current/cli.html
+ Query language http://tajo.apache.org/docs/current/sql_language.html
+ Functions http://tajo.apache.org/docs/current/functions.html
+ Backup & restore
http://tajo.apache.org/docs/current/backup_and_restore.html
+ Configuration
http://tajo.apache.org/docs/current/configuration.html
+
+-----------------------------------------------
+Basic usages
+-----------------------------------------------
+
+``\l`` command shows a list of all databases as follows: ::
+
+ default> \l
+ default
+ tpch
+ work1
+ default>
+
+
+
+``\d`` command shows a list of tables in the current database as follows:
::
+
+ default> \d
+ customer
+ lineitem
+ nation
+ orders
+ part
+ partsupp
+ region
+ supplier
+
+
+``\d [table name]`` command also shows a table description as follows: ::
+
+ default> \d orders
+
+ table name: orders
+ table path: hdfs:/xxx/xxx/tpch/orders
+ store type: CSV
+ number of rows: 0
+ volume (bytes): 172.0 MB
+ schema:
+ o_orderkey INT8
+ o_custkey INT8
+ o_orderstatus TEXT
+ o_totalprice FLOAT8
+ o_orderdate TEXT
+ o_orderpriority TEXT
+ o_clerk TEXT
+ o_shippriority INT4
+ o_comment TEXT
+
+
+
+The prompt ``default>`` indicates the current database. Basically, all SQL
statements and meta commands work in the current database. Also, you can change
the current database with ``\c`` command.
+
+.. code-block:: sql
+
+ default> \c work1
+ You are now connected to database "test" as user "hyunsik".
+ work1>
+
+
+``\df`` command shows a list of all buit-in function as follows: ::
--- End diff --
Typo: "function" -> "functions"
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---