Database Reference
In-Depth Information
The RCFile file format with Impala tables
When you create a table with the RCFile format, without using any existing data use
with the table, the syntax is as follows:
CREATE TABLE my_rcfile_table (userID int,
userName string)
STORED AS RCFile;
Impala can query RCFile-type tables but cannot write to them, so you would need to
use Hive to write data into the file using the INSERT statement. With Hive, you don't
need to specify the storage file type as Hive takes care of it by default.
Tip
Please visit the Cloudera Impala documentation for RCFile file support at the fol-
lowing URL:
http://www.cloudera.com/content/cloudera-content/cloudera-docs/Impala/latest/
Installing-and-Using-Impala/ciiu_rcfile.html
The SequenceFile file format with Impala tables
Like RCFile, Impala supports the creation of tables that can store SequenceFile data.
To create an empty table to store SequenceFile-type data in Impala, you just need to
use the following syntax in the Impala shell:
CREATE TABLE my_sequencefile_table (userID int,
userName string)
STORED AS SEQUENCEFILE;
The rest of the steps require you to use Hive for setting up file compression and then
writing data into the table using the appropriate INSERT statement.
Search WWH ::




Custom Search