Database Reference
In-Depth Information
[Hadoop.testdomain:21000] > describe automakers;
Query finished, fetching results ...
+------------+--------+---------+
| name | type | comment |
+------------+--------+---------+
| automaker | string | |
+------------+--------+---------+
Returned 2 row(s) in 0.46s
The following is the second example:
[Hadoop.testdomain:21000] > describe
automobiles;
Query finished, fetching results ...
+--------------+--------+---------+
| name | type | comment |
+--------------+--------+---------+
| make | string | |
| model | string | |
| autoyear | int | |
| fueltype | string | |
| numofdoors | int | |
| design | string | |
| autotype | string | |
| cylinders | int | |
| horsepower | int | |
| city_hwy_mpg | string | |
| price | float | |
+--------------+--------+---------+
Returned 11 row(s) in 0.54s
In the preceding code snippets, you can see how the describe command shows
each field's name and field-type information.
Now, I will create another table named motorcycles and load data from the
/user/cloudera/motorcycles/motorcycles.txt file located in HDFS into
the table as follows:
Search WWH ::




Custom Search