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/using-json-in-hive.md
+6-21Lines changed: 6 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,10 +7,10 @@ ms.reviewer: jasonh
7
7
ms.service: hdinsight
8
8
ms.custom: hdinsightactive
9
9
ms.topic: conceptual
10
-
ms.date: 02/27/2019
10
+
ms.date: 06/03/2019
11
11
ms.author: hrasheed
12
-
13
12
---
13
+
14
14
# Process and analyze JSON documents by using Apache Hive in Azure HDInsight
15
15
16
16
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.
88
88
89
89
Here is the output of the **SELECT** statement:
90
90
91
-
![Flattening the JSON document][image-hdi-hivejson-flatten]
91
+

92
92
93
93
## Analyze JSON documents in Hive
94
94
Hive provides three different mechanisms to run queries on JSON documents, or you can write your own:
@@ -112,7 +112,7 @@ FROM StudentsOneLine;
112
112
113
113
Here is the output when you run this query in the console window:
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.
139
139
@@ -149,19 +149,4 @@ For related articles, see:
149
149
150
150
*[Use Apache Hive and HiveQL with Apache Hadoop in HDInsight to analyze a sample Apache log4j file](../hdinsight-use-hive.md)
151
151
*[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)
0 commit comments