Github user eminency commented on a diff in the pull request:

    https://github.com/apache/tajo/pull/677#discussion_r37379980
  
    --- Diff: 
tajo-docs/src/main/sphinx/partitioning/add_data_to_partition_table.rst ---
    @@ -0,0 +1,62 @@
    +********************************
    +Add data to Partition Table
    +********************************
    +
    +Tajo provides a very useful feature of dynamic partitioning. You don't 
need to use any syntax with both ``INSERT INTO ... SELECT`` and ``Create Table 
As Select(CTAS)`` statments for dynamic partitioning. Tajo will automatically 
filter the data, create directories, move filtered data to appropriate 
directory and create partition over it.
    +
    +For example, assume there are both ``student_source`` and ``student`` 
tables composed of the following schema.
    +
    +.. code-block:: sql
    +
    +  CREATE TABLE student_source (
    +    id        INT,
    +    name      TEXT,
    +    gender    char(1),
    +    grade     TEXT,
    +    country   TEXT,
    +    city      TEXT,
    +    phone     TEXT
    +  );
    +
    +  CREATE TABLE student (
    +    id     INT,
    +    name   TEXT,
    +    grade  TEXT
    +  ) PARTITION BY COLUMN (country TEXT, city TEXT);
    +
    +
    +================================================
    +How to INSERT dynamically to partition table
    +================================================
    +
    +If you want to load an entire country or an entire city in one fell swoop:
    +
    +.. code-block:: sql
    +
    +  INSERT OVERWRITE INTO student
    +  SELECT id, name, grade, country, city
    +  FROM   student_source;
    +
    +
    +================================================
    +How to CTAS dynamically to partition table
    +================================================
    +
    +If you want to load an entire country or an entire city in one fell swoop:
    --- End diff --
    
    Explanation is same precisely as above one.
    I think it's better to add some words like 'including CREATE TABLE' or 
'when a partition table is created'


---
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.
---

Reply via email to