Integrate Tableau Data Visualization with Hive Data Warehouse and Apache Spark SQL
Components relevant to the subject:
Hive Warehouse
SPARK SQL
Apache Thrift Framework
Spark thrift server
Tableau
Running query on Hive
(base) dv6@dv6:~$ hive
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/home/dv6/hive/hive/lib/log4j-slf4j-impl-2.10.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/home/dv6/hadoop-2.7.7/share/hadoop/common/lib/slf4j-log4j12β1.7.10.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.apache.logging.slf4j.Log4jLoggerFactory]
Hive Session ID = 2a7264c1β44d2β4b7c-b1ad-ae4b78059bf4
For example:
Logging initialized using configuration in jar:file:/home/dv6/hive/hive/lib/hive-common-3.1.2.jar!/hive-log4j2.properties Async: true
Hive-on-MR is deprecated in Hive 2 and may not be available in the future versions. Consider using a different execution engine (i.e. spark, tez) or using Hive 1.X releases.
Hive Session ID = d8354df2β7a05β4444β931e-566676b7e421
hive> show schemas;
OK
default
jentekllc
Time taken: 1.184 seconds, Fetched: 2 row(s)
hive> use jentekllc;
OK
Time taken: 0.032 seconds
hive> show tables;
OK
abc
economy
economy_data
economydata
Time taken: 0.037 seconds, Fetched: 4 row(s)
hive> select * from economydata order by 1 limit 5;
Query ID = dv6_20200425115847_384d118f-6420β4a24-a27a-2f44f9072a04
Total jobs = 1
Launching Job 1 out of 1
Number of reduce tasks determined at compile time: 1
In order to change the average load for a reducer (in bytes):
set hive.exec.reducers.bytes.per.reducer=<number>
In order to limit the maximum number of reducers:
set hive.exec.reducers.max=<number>
In order to set a constant number of reducers:
set mapreduce.job.reduces=<number>
Starting Job = job_1587711146522_0008, Tracking URL = http://dv6:8088/proxy/application_1587711146522_0008/
Kill Command = /home/dv6/hadoop-2.7.7/bin/mapred job -kill job_1587711146522_0008
Hadoop job information for Stage-1: number of mappers: 1; number of reducers: 1
2020β04β25 11:59:05,337 Stage-1 map = 0%, reduce = 0%
2020β04β25 11:59:14,563 Stage-1 map = 100%, reduce = 0%, Cumulative CPU 3.47 sec
2020β04β25 11:59:23,431 Stage-1 map = 100%, reduce = 100%, Cumulative CPU 7.24 sec
MapReduce Total cumulative CPU time: 7 seconds 240 msec
Ended Job = job_1587711146522_0008
MapReduce Jobs Launched:
Stage-Stage-1: Map: 1 Reduce: 1 Cumulative CPU: 7.24 sec HDFS Read: 71037 HDFS Write: 319 SUCCESS
Total MapReduce CPU Time Spent: 7 seconds 240 msec
OK
1930β01β01 1930 3 Years -0.277691
1930β01β01 1930 10 Years -0.027198
1930β01β01 1930 P/E 16.682171
1930β01β01 1930 S&P Composite 21.520000
1930β01β01 1930 1 Year -0.241846
Time taken: 37.414 seconds, Fetched: 5 row(s)Running same query on same Hive table on Spark
spark-sql client
hive-site.xml
Integrate with Spark
Connect tableau to visualize business intelligence
Download Tableau to Spark SQL ODBC driver



After installation of ODBC driver in prior step, relaunch tableau desktop, choose connect to Spark SQL




Summary
Last updated