<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: Writing contents of table to file in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Writing-contents-of-table-to-file/m-p/26728#M5621</link>
    <description>&lt;P&gt;Here are 2 ways to constrain the output to only be a single file. You can set the query option NUM_NODES=1, and all work is done on the coordinator node. You can put a large LIMIT on the query, bigger than the number of rows you are actually inserting, and all the intermediate results are combined on the coordinator node. (I have not looked into the mechanics enough to say which way is more efficient.)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's an example where, by default, a CREATE TABLE AS SELECT operation would produce 4 output files, because I'm on a 4-node cluster. (The source table BILLION_NUMBERS has 113 files and 2.79 GB, enough data so that it won't go into a single output file by accident.) Setting NUM_NODES=1 produces a single output file. Setting NUM_NODES back to 0 and then doing CTAS+LIMIT produces a single output file.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;[localhost:21000] &amp;gt; show table stats billion_numbers;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;+-------+--------+--------+--------------+-------------------+--------+-------------------+&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;| #Rows | #Files | Size &lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;| Bytes Cached | Cache Replication | Format | Incremental stats |&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;+-------+--------+--------+--------------+-------------------+--------+-------------------+&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;| -1&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;| 113&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;| 2.79GB | NOT CACHED &lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;| NOT CACHED&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;| TEXT &lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;| false &lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;|&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;+-------+--------+--------+--------------+-------------------+--------+-------------------+&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;[localhost:21000] &amp;gt; set;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;Query options (defaults shown in []):&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;...&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;NUM_NODES: [0]&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;...&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;[localhost:21000] &amp;gt; create table num_nodes_0 as select * from billion_numbers;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;+----------------------------+&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;| summary&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;|&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;+----------------------------+&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;| Inserted 1000000000 row(s) |&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;+----------------------------+&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;[localhost:21000] &amp;gt; show table stats num_nodes_0;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;+-------+--------+--------+--------------+-------------------+--------+-------------------+&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;| #Rows | #Files | Size &lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;| Bytes Cached | Cache Replication | Format | Incremental stats |&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;+-------+--------+--------+--------------+-------------------+--------+-------------------+&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;| -1&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;| 4&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;| 2.79GB | NOT CACHED &lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;| NOT CACHED&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;| TEXT &lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;| false &lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;|&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;+-------+--------+--------+--------------+-------------------+--------+-------------------+&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;[localhost:21000] &amp;gt; set num_nodes=1;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;[localhost:21000] &amp;gt; create table num_nodes_1 as select * from oreilly.billion_numbers;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;+----------------------------+&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;| summary&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;|&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;+----------------------------+&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;| Inserted 1000000000 row(s) |&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;+----------------------------+&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;[localhost:21000] &amp;gt; show table stats num_nodes_1;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;+-------+--------+--------+--------------+-------------------+--------+-------------------+&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;| #Rows | #Files | Size &lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;| Bytes Cached | Cache Replication | Format | Incremental stats |&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;+-------+--------+--------+--------------+-------------------+--------+-------------------+&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;| -1&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;| 1&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;| 2.79GB | NOT CACHED &lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;| NOT CACHED&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;| TEXT &lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;| false &lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;|&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;+-------+--------+--------+--------------+-------------------+--------+-------------------+&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;[localhost:21000] &amp;gt; set num_nodes=0;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;[localhost:21000] &amp;gt; create table ctas_with_limit as select * from billion_numbers limit 100000000000000;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;+----------------------------+&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;| summary&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;|&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;+----------------------------+&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;| Inserted 1000000000 row(s) |&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;+----------------------------+&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;[localhost:21000] &amp;gt; show table stats ctas_with_limit;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;+-------+--------+--------+--------------+-------------------+--------+-------------------+&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;| #Rows | #Files | Size &lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;| Bytes Cached | Cache Replication | Format | Incremental stats |&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;+-------+--------+--------+--------------+-------------------+--------+-------------------+&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;| -1&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;| 1&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;| 2.79GB | NOT CACHED &lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;| NOT CACHED&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;| TEXT &lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;| false &lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;|&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;+-------+--------+--------+--------------+-------------------+--------+-------------------+&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 23 Apr 2015 17:15:49 GMT</pubDate>
    <dc:creator>John Russell</dc:creator>
    <dc:date>2015-04-23T17:15:49Z</dc:date>
    <item>
      <title>Writing contents of table to file</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Writing-contents-of-table-to-file/m-p/26689#M5620</link>
      <description>&lt;P&gt;I have a doubt on writing contents of a table to a file using delimeters such as |&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;CREATE EXTERNAL TABLE additional_Variables
ROW FORMAT DELIMITED FIELDS TERMINATED BY '|' LINES TERMINATED BY '\n' STORED AS TEXTFILE LOCATION '/user/Data/additional_Variables'
AS
SELECT
   *
FROM
    MYTABLE&lt;/PRE&gt;&lt;P&gt;This is the SQL i use to create file. When i visit the directory to view the file generated. Instead of just one file , there is often two files generated where 1 of them is a larger file and the second one is smaller.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any way to write content from a table to a single file.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Apr 2015 16:41:15 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Writing-contents-of-table-to-file/m-p/26689#M5620</guid>
      <dc:creator>kskrishnasangeeth</dc:creator>
      <dc:date>2015-04-22T16:41:15Z</dc:date>
    </item>
    <item>
      <title>Re: Writing contents of table to file</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Writing-contents-of-table-to-file/m-p/26728#M5621</link>
      <description>&lt;P&gt;Here are 2 ways to constrain the output to only be a single file. You can set the query option NUM_NODES=1, and all work is done on the coordinator node. You can put a large LIMIT on the query, bigger than the number of rows you are actually inserting, and all the intermediate results are combined on the coordinator node. (I have not looked into the mechanics enough to say which way is more efficient.)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's an example where, by default, a CREATE TABLE AS SELECT operation would produce 4 output files, because I'm on a 4-node cluster. (The source table BILLION_NUMBERS has 113 files and 2.79 GB, enough data so that it won't go into a single output file by accident.) Setting NUM_NODES=1 produces a single output file. Setting NUM_NODES back to 0 and then doing CTAS+LIMIT produces a single output file.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;[localhost:21000] &amp;gt; show table stats billion_numbers;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;+-------+--------+--------+--------------+-------------------+--------+-------------------+&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;| #Rows | #Files | Size &lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;| Bytes Cached | Cache Replication | Format | Incremental stats |&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;+-------+--------+--------+--------------+-------------------+--------+-------------------+&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;| -1&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;| 113&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;| 2.79GB | NOT CACHED &lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;| NOT CACHED&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;| TEXT &lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;| false &lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;|&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;+-------+--------+--------+--------------+-------------------+--------+-------------------+&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;[localhost:21000] &amp;gt; set;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;Query options (defaults shown in []):&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;...&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;NUM_NODES: [0]&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;...&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;[localhost:21000] &amp;gt; create table num_nodes_0 as select * from billion_numbers;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;+----------------------------+&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;| summary&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;|&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;+----------------------------+&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;| Inserted 1000000000 row(s) |&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;+----------------------------+&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;[localhost:21000] &amp;gt; show table stats num_nodes_0;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;+-------+--------+--------+--------------+-------------------+--------+-------------------+&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;| #Rows | #Files | Size &lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;| Bytes Cached | Cache Replication | Format | Incremental stats |&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;+-------+--------+--------+--------------+-------------------+--------+-------------------+&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;| -1&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;| 4&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;| 2.79GB | NOT CACHED &lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;| NOT CACHED&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;| TEXT &lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;| false &lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;|&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;+-------+--------+--------+--------------+-------------------+--------+-------------------+&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;[localhost:21000] &amp;gt; set num_nodes=1;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;[localhost:21000] &amp;gt; create table num_nodes_1 as select * from oreilly.billion_numbers;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;+----------------------------+&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;| summary&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;|&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;+----------------------------+&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;| Inserted 1000000000 row(s) |&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;+----------------------------+&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;[localhost:21000] &amp;gt; show table stats num_nodes_1;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;+-------+--------+--------+--------------+-------------------+--------+-------------------+&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;| #Rows | #Files | Size &lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;| Bytes Cached | Cache Replication | Format | Incremental stats |&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;+-------+--------+--------+--------------+-------------------+--------+-------------------+&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;| -1&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;| 1&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;| 2.79GB | NOT CACHED &lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;| NOT CACHED&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;| TEXT &lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;| false &lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;|&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;+-------+--------+--------+--------------+-------------------+--------+-------------------+&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;[localhost:21000] &amp;gt; set num_nodes=0;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;[localhost:21000] &amp;gt; create table ctas_with_limit as select * from billion_numbers limit 100000000000000;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;+----------------------------+&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;| summary&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;|&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;+----------------------------+&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;| Inserted 1000000000 row(s) |&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;+----------------------------+&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;[localhost:21000] &amp;gt; show table stats ctas_with_limit;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;+-------+--------+--------+--------------+-------------------+--------+-------------------+&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;| #Rows | #Files | Size &lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;| Bytes Cached | Cache Replication | Format | Incremental stats |&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;+-------+--------+--------+--------------+-------------------+--------+-------------------+&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;| -1&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;| 1&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;| 2.79GB | NOT CACHED &lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;| NOT CACHED&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;| TEXT &lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;| false &lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;|&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN class="s1"&gt;+-------+--------+--------+--------------+-------------------+--------+-------------------+&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Apr 2015 17:15:49 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Writing-contents-of-table-to-file/m-p/26728#M5621</guid>
      <dc:creator>John Russell</dc:creator>
      <dc:date>2015-04-23T17:15:49Z</dc:date>
    </item>
  </channel>
</rss>

