TAJO-1624: Add managed table or external description in Table management section.
Closes #588 Project: http://git-wip-us.apache.org/repos/asf/tajo/repo Commit: http://git-wip-us.apache.org/repos/asf/tajo/commit/03294e14 Tree: http://git-wip-us.apache.org/repos/asf/tajo/tree/03294e14 Diff: http://git-wip-us.apache.org/repos/asf/tajo/diff/03294e14 Branch: refs/heads/index_support Commit: 03294e1453586f64fe96458461f149851b443b42 Parents: 39fdadc Author: Hyunsik Choi <[email protected]> Authored: Thu May 28 05:19:51 2015 -0700 Committer: Hyunsik Choi <[email protected]> Committed: Thu May 28 05:19:51 2015 -0700 ---------------------------------------------------------------------- CHANGES | 3 ++ .../sphinx/table_management/table_overview.rst | 29 ++++++++++++++++++-- 2 files changed, 30 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/tajo/blob/03294e14/CHANGES ---------------------------------------------------------------------- diff --git a/CHANGES b/CHANGES index 7023419..85c28ce 100644 --- a/CHANGES +++ b/CHANGES @@ -27,6 +27,9 @@ Release 0.11.0 - unreleased IMPROVEMENT + TAJO-1624: Add managed table or external description in Table management + section. (hyunsik) + TAJO-1626: JdbcConnection::setAutoCommit() should not throw an exception. (hyunsik) http://git-wip-us.apache.org/repos/asf/tajo/blob/03294e14/tajo-docs/src/main/sphinx/table_management/table_overview.rst ---------------------------------------------------------------------- diff --git a/tajo-docs/src/main/sphinx/table_management/table_overview.rst b/tajo-docs/src/main/sphinx/table_management/table_overview.rst index 3985e19..b63fb69 100644 --- a/tajo-docs/src/main/sphinx/table_management/table_overview.rst +++ b/tajo-docs/src/main/sphinx/table_management/table_overview.rst @@ -8,12 +8,37 @@ Overview Managed Table ================ -.. todo:: +``CREATE TABLE`` statement with ``EXTERNAL`` keyword lets you create a table located in the warehouse directory specified by the configuration property ``tajo.warehouse.directory`` or ``${tajo.root}/warehouse`` by default. For example: + +.. code-block:: sql + + CREATE TABLE employee ( + id int, + name text, + age + ); + External Table ================ -.. todo:: +``CREATE EXTERNAL TABLE`` statement lets you create a table located in a specify location so that Tajo does not use a default data warehouse location for the table. External tables are in common used if you already have data generated. LOCATION clause must be required for an external table. + +.. code-block:: sql + + CREATE EXTERNAL TABLE employee ( + id int, + name text, + age + ) LOCATION 'hdfs://table/path'; + + +The location can be a directory located in HDFS, Amazon S3, HBase, or local file system (if a Tajo cluster runs in a single machine). URI examples are as follows: + + * HDFS - ``hdfs://hostname:8020/table1`` + * Amazon S3 - ``s3://bucket-name/table1`` + * local file system - ``file:///dir/table1`` + * Openstack Swift - ``swift://bucket-name/table1`` Table Properties ================
