Skip to content

Commit d43ae71

Browse files
committed
freshness36
1 parent 798eb00 commit d43ae71

File tree

1 file changed

+17
-21
lines changed

1 file changed

+17
-21
lines changed

articles/hdinsight/hadoop/apache-hadoop-use-hive-ambari-view.md

Lines changed: 17 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ author: hrasheed-msft
55
ms.author: hrasheed
66
ms.reviewer: jasonh
77
ms.service: hdinsight
8-
ms.custom: hdinsightactive
98
ms.topic: conceptual
10-
ms.date: 10/24/2019
9+
ms.custom: hdinsightactive
10+
ms.date: 04/06/2020
1111
---
1212

1313
# 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
1818

1919
## Prerequisites
2020

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).
2322

2423
## Run a Hive query
2524

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.
2726

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.
2928

3029
1. From the list of views, select __Hive View__.
3130

@@ -54,18 +53,15 @@ Learn how to run Hive queries by using Apache Ambari Hive View. The Hive View al
5453
GROUP BY t4;
5554
```
5655
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:
6757
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].|
6965
7066
> [!IMPORTANT]
7167
> 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.
111107
112108
From the **Query** tab, you can optionally save queries. After you save a query, you can reuse it from the __Saved Queries__ tab.
113109
114-
![Apache Hive view saved queries tab](./media/apache-hadoop-use-hive-ambari-view/ambari-saved-queries.png)
110+
![Apache Hive views saved queries tab](./media/apache-hadoop-use-hive-ambari-view/ambari-saved-queries.png)
115111
116112
> [!TIP]
117113
> 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
126122
127123
![Apache Hive view UDFs tab display](./media/apache-hadoop-use-hive-ambari-view/user-defined-functions.png)
128124
129-
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.
130126
131127
For example, if you've defined a UDF with the following properties:
132128
@@ -150,13 +146,13 @@ You can then use the UDF in your query. For example, `SELECT myawesomeudf(name)
150146
For more information on using UDFs with Hive on HDInsight, see the following articles:
151147

152148
* [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)
154150

155151
## Hive settings
156152

157153
You can change various Hive settings, such as changing the execution engine for Hive from Tez (the default) to MapReduce.
158154

159-
## <a id="nextsteps"></a>Next steps
155+
## Next steps
160156

161157
For general information on Hive on HDInsight:
162158

0 commit comments

Comments
 (0)