官术网_书友最值得收藏!

Creating a table

Once we have created a database, we are ready to create a table in the database. The table creation is syntactically similar to most RDBMS (database systems such as Oracle, MySQL):

create external table OnlineRetail (
InvoiceNo string,
StockCode string,
Description string,
Quantity integer,
InvoiceDate string,
UnitPrice float,
CustomerID string,
Country string
) ROW FORMAT DELIMITED
FIELDS TERMINATED BY ','
LOCATION '/user/normal';

The following is the hive console and what it looks like:

We will not get into the syntax of query statements, rather, we will discuss how to improve the query performance significantly using the stinger initiative as follows:

select count(*) from OnlineRetail;

The following is the hive console showing the query execution:

主站蜘蛛池模板: 台东市| 中方县| 洪湖市| 全椒县| 武隆县| 东丰县| 桐城市| 海阳市| 安吉县| 广丰县| 寻乌县| 新巴尔虎右旗| 新安县| 文山县| 琼结县| 长泰县| 东辽县| 道孚县| 饶平县| 宿迁市| 马龙县| 伊川县| 泽州县| 府谷县| 大田县| 萨嘎县| 巴彦淖尔市| 永福县| 长宁区| 马边| 天门市| 屯留县| 那曲县| 文山县| 丁青县| 女性| 池州市| 东乡县| 咸宁市| 神农架林区| 永宁县|