Skip to content

Commit 18b6c67

Browse files
committed
freshness108
1 parent 64870be commit 18b6c67

File tree

8 files changed

+6
-21
lines changed

8 files changed

+6
-21
lines changed
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

articles/hdinsight/hadoop/using-json-in-hive.md

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ ms.reviewer: jasonh
77
ms.service: hdinsight
88
ms.custom: hdinsightactive
99
ms.topic: conceptual
10-
ms.date: 02/27/2019
10+
ms.date: 06/03/2019
1111
ms.author: hrasheed
12-
1312
---
13+
1414
# Process and analyze JSON documents by using Apache Hive in Azure HDInsight
1515

1616
Learn how to process and analyze JavaScript Object Notation (JSON) files by using Apache Hive in Azure HDInsight. This tutorial uses the following JSON document:
@@ -88,7 +88,7 @@ The **SELECT** statement only returns one row.
8888

8989
Here is the output of the **SELECT** statement:
9090

91-
![Flattening the JSON document][image-hdi-hivejson-flatten]
91+
![Flattening the JSON document](./media/using-json-in-hive/flatten.png)
9292

9393
## Analyze JSON documents in Hive
9494
Hive provides three different mechanisms to run queries on JSON documents, or you can write your own:
@@ -112,7 +112,7 @@ FROM StudentsOneLine;
112112

113113
Here is the output when you run this query in the console window:
114114

115-
![get_json_object UDF][image-hdi-hivejson-getjsonobject]
115+
![get_json_object UDF](./media/using-json-in-hive/getjsonobject.png)
116116

117117
There are limitations of the get_json_object UDF:
118118

@@ -133,7 +133,7 @@ LATERAL VIEW JSON_TUPLE(jt.json_body, 'StudentId', 'Grade') q1
133133

134134
The output of this script in the Hive console:
135135

136-
![json_tuple UDF][image-hdi-hivejson-jsontuple]
136+
![json_tuple UDF](./media/using-json-in-hive/jsontuple.png)
137137

138138
The json_tuple UDF uses the [lateral view](https://cwiki.apache.org/confluence/display/Hive/LanguageManual+LateralView) syntax in Hive, which enables json\_tuple to create a virtual table by applying the UDT function to each row of the original table. Complex JSONs become too unwieldy because of the repeated use of **LATERAL VIEW**. Furthermore, **JSON_TUPLE** cannot handle nested JSONs.
139139

@@ -149,19 +149,4 @@ For related articles, see:
149149

150150
* [Use Apache Hive and HiveQL with Apache Hadoop in HDInsight to analyze a sample Apache log4j file](../hdinsight-use-hive.md)
151151
* [Analyze flight delay data by using Apache Hive in HDInsight](../hdinsight-analyze-flight-delay-data-linux.md)
152-
* [Analyze Twitter data by using Apache Hive in HDInsight](../hdinsight-analyze-twitter-data-linux.md)
153-
154-
[hdinsight-python]:python-udf-hdinsight.md
155-
156-
[image-hdi-hivejson-flatten]: ./media/using-json-in-hive/flatten.png
157-
[image-hdi-hivejson-getjsonobject]: ./media/using-json-in-hive/getjsonobject.png
158-
[image-hdi-hivejson-jsontuple]: ./media/using-json-in-hive/jsontuple.png
159-
[image-hdi-hivejson-jdk]: ./media/hdinsight-using-json-in-hive/jdk.png
160-
[image-hdi-hivejson-maven]: ./media/hdinsight-using-json-in-hive/maven.png
161-
[image-hdi-hivejson-serde]: ./media/hdinsight-using-json-in-hive/serde.png
162-
[image-hdi-hivejson-addjar]: ./media/hdinsight-using-json-in-hive/addjar.png
163-
[image-hdi-hivejson-serde_query1]: ./media/hdinsight-using-json-in-hive/serde_query1.png
164-
[image-hdi-hivejson-serde_query2]: ./media/hdinsight-using-json-in-hive/serde_query2.png
165-
[image-hdi-hivejson-serde_query3]: ./media/hdinsight-using-json-in-hive/serde_query3.png
166-
[image-hdi-hivejson-serde_result]: ./media/hdinsight-using-json-in-hive/serde_result.png
167-
152+
* [Analyze Twitter data by using Apache Hive in HDInsight](../hdinsight-analyze-twitter-data-linux.md)

0 commit comments

Comments
 (0)