You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/hdinsight/hadoop/apache-hadoop-use-hive-ambari-view.md
+17-21Lines changed: 17 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,9 +5,9 @@ author: hrasheed-msft
5
5
ms.author: hrasheed
6
6
ms.reviewer: jasonh
7
7
ms.service: hdinsight
8
-
ms.custom: hdinsightactive
9
8
ms.topic: conceptual
10
-
ms.date: 10/24/2019
9
+
ms.custom: hdinsightactive
10
+
ms.date: 04/06/2020
11
11
---
12
12
13
13
# Use Apache Ambari Hive View with Apache Hadoop in HDInsight
@@ -18,14 +18,13 @@ Learn how to run Hive queries by using Apache Ambari Hive View. The Hive View al
18
18
19
19
## Prerequisites
20
20
21
-
* A Hadoop cluster on HDInsight. See [Get Started with HDInsight on Linux](./apache-hadoop-linux-tutorial-get-started.md).
22
-
* A web browser
21
+
A Hadoop cluster on HDInsight. See [Get Started with HDInsight on Linux](./apache-hadoop-linux-tutorial-get-started.md).
23
22
24
23
## Run a Hive query
25
24
26
-
1. From the [Azure portal](https://portal.azure.com/), select your cluster. See [List and show clusters](../hdinsight-administer-use-portal-linux.md#showClusters) for instructions. The cluster is opened in a new portal blade.
25
+
1. From the [Azure portal](https://portal.azure.com/), select your cluster. See [List and show clusters](../hdinsight-administer-use-portal-linux.md#showClusters) for instructions. The cluster is opened in a new portal view.
27
26
28
-
1. From **Cluster dashboards**, select **Ambari views**. When prompted to authenticate, use the cluster login (default `admin`) account name and password that you provided when you created the cluster. Alternatively, navigate to `https://CLUSTERNAME.azurehdinsight.net/#/main/views` in your browser where `CLUSTERNAME` is the name of your cluster.
27
+
1. From **Cluster dashboards**, select **Ambari views**. When prompted to authenticate, use the cluster login (default `admin`) account name and password that you provided when you created the cluster. You can also navigate to `https://CLUSTERNAME.azurehdinsight.net/#/main/views` in your browser where `CLUSTERNAME` is the name of your cluster.
29
28
30
29
1. From the list of views, select __Hive View__.
31
30
@@ -54,18 +53,15 @@ Learn how to run Hive queries by using Apache Ambari Hive View. The Hive View al
54
53
GROUP BY t4;
55
54
```
56
55
57
-
These statements perform the following actions:
58
-
59
-
* `DROP TABLE`: Deletes the table and the data file, in case the table already exists.
60
-
61
-
* `CREATE EXTERNAL TABLE`: Creates a new "external" table in Hive.
62
-
External tables store only the table definition in Hive. The data is left in the original location.
63
-
64
-
* `ROW FORMAT`: Shows how the data is formatted. In this case, the fields in each log are separated by a space.
65
-
66
-
* `STORED AS TEXTFILE LOCATION`: Shows where the data is stored, and that it's stored as text.
56
+
These statements do the following actions:
67
57
68
-
* `SELECT`: Selects a count of all rows where column t4 contains the value [ERROR].
58
+
|Statement | Description |
59
+
|---|---|
60
+
|DROP TABLE|Deletes the table and the data file, in case the table already exists.|
61
+
|CREATE EXTERNAL TABLE|Creates a new "external" table in Hive. External tables store only the table definition in Hive. The data is left in the original location.|
62
+
|ROW FORMAT|Shows how the data is formatted. In this case, the fields in each log are separated by a space.|
63
+
|STORED AS TEXTFILE LOCATION|Shows where the data is stored, and that it's stored as text.|
64
+
|SELECT|Selects a count of all rows where column t4 contains the value [ERROR].|
69
65
70
66
> [!IMPORTANT]
71
67
> Leave the __Database__ selection at __default__. The examples in this document use the default database included with HDInsight.
@@ -111,7 +107,7 @@ You can use the __Tables__ tab to work with tables within a Hive database.
111
107
112
108
From the **Query** tab, you can optionally save queries. After you save a query, you can reuse it from the __Saved Queries__ tab.
> Saved queries are stored in the default cluster storage. You can find the saved queries under the path `/user/<username>/hive/scripts`. These are stored as plain-text `.hql` files.
@@ -126,7 +122,7 @@ Declare and save a set of UDFs by using the **UDF** tab at the top of the Hive V
After you've added a UDF to the Hive View, an **Insert udfs** button appears at the bottom of the **Query Editor**. Selecting this entry displays a drop-down list of the UDFs defined in the Hive View. Selecting a UDF adds HiveQL statements to your query to enable the UDF.
125
+
An **Insert udfs** button appears at the bottom of the **Query Editor**. This entry displays a drop-down list of the UDFs defined in the Hive View. Selecting a UDF adds HiveQL statements to your query to enable the UDF.
130
126
131
127
For example, if you've defined a UDF with the following properties:
132
128
@@ -150,13 +146,13 @@ You can then use the UDF in your query. For example, `SELECT myawesomeudf(name)
150
146
For more information on using UDFs with Hive on HDInsight, see the following articles:
151
147
152
148
*[Using Python with Apache Hive and Apache Pig in HDInsight](python-udf-hdinsight.md)
153
-
*[How to add a custom Apache Hive UDF to HDInsight](https://blogs.msdn.com/b/bigdatasupport/archive/2014/01/14/how-to-add-custom-hive-udfs-to-hdinsight.aspx)
149
+
*[Use a Java UDF with Apache Hive in HDInsight](./apache-hadoop-hive-java-udf.md)
154
150
155
151
## Hive settings
156
152
157
153
You can change various Hive settings, such as changing the execution engine for Hive from Tez (the default) to MapReduce.
0 commit comments