<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: CDSW - Can't access hive Tables from Scala Workbench in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/CDSW-Can-t-access-hive-Tables-from-Scala-Workbench/m-p/57325#M17642</link>
    <description>&lt;P&gt;Hi Peter,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The goal is to run Data Analysis using Spark where part of the data is stored in hive, The idea is to use the whole cluster to distribute the workload.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I missed the&amp;nbsp;fact that I was&amp;nbsp;running in local mode (As said it's a pilot, i'm totally new to Cloudera stack). I assumed that the workbench was by default in yarn mode. I'll dig in the doc again.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Trying to access hive using Sparksession object in my test was returning nothing. I'll try using yarn &amp;amp; report back&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks!&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 13 Jul 2017 11:33:00 GMT</pubDate>
    <dc:creator>ChrisV</dc:creator>
    <dc:date>2017-07-13T11:33:00Z</dc:date>
    <item>
      <title>CDSW - Can't access hive Tables from Scala Workbench</title>
      <link>https://community.cloudera.com/t5/Support-Questions/CDSW-Can-t-access-hive-Tables-from-Scala-Workbench/m-p/57321#M17640</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;While running a Pilot for CDSW &amp;amp; CDH, i'm struggling running queries on hive table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Scala Workbench&amp;nbsp;&lt;/P&gt;&lt;P&gt;Test code:&lt;/P&gt;&lt;PRE&gt;import org.apache.spark.sql.Row
import org.apache.spark.sql.hive.HiveContext  
import org.apache.spark.sql.Column

val sparkSession = SparkSession.builder.master("local").appName("mapexample").
        enableHiveSupport().getOrCreate()
  
sparkSession.catalog.listTables.show()

val sqlContext = new HiveContext(sc)

sqlContext.sql("describe database default").show
sqlContext.sql("describe formatted default.mytable").show
sc.version&lt;/PRE&gt;&lt;P&gt;Test return&lt;/P&gt;&lt;PRE&gt;import org.apache.spark.sql.Row
import org.apache.spark.sql.hive.HiveContext
import org.apache.spark.sql.Column
val sparkSession = SparkSession.builder.master("local").appName("mapexample").
        enableHiveSupport().getOrCreate()
sparkSession.catalog.listTables.show()
+----+--------+-----------+---------+-----------+
|name|database|description|tableType|isTemporary|
+----+--------+-----------+---------+-----------+
+----+--------+-----------+---------+-----------+

val sqlContext = new HiveContext(sc)
sqlContext.sql("describe database default").show
+-------------------------+--------------------------+
|database_description_item|database_description_value|
+-------------------------+--------------------------+
|            Database Name|                   default|
|              Description|          default database|
|                 Location|      /user/hive/warehouse|
+-------------------------+--------------------------+

sqlContext.sql("describe formatted default.mytable").show
Name: org.apache.spark.sql.catalyst.analysis.NoSuchTableException
Message: Table or view 'mytable' not found in database 'default';
StackTrace:   at org.apache.spark.sql.catalyst.catalog.SessionCatalog.requireTableExists(SessionCatalog.scala:138)
  at org.apache.spark.sql.catalyst.catalog.SessionCatalog.getTableMetadata(SessionCatalog.scala:289)
  at org.apache.spark.sql.execution.command.DescribeTableCommand.run(tables.scala:437)
  at org.apache.spark.sql.execution.command.ExecutedCommandExec.sideEffectResult$lzycompute(commands.scala:58)
  at org.apache.spark.sql.execution.command.ExecutedCommandExec.sideEffectResult(commands.scala:56)
  at org.apache.spark.sql.execution.command.ExecutedCommandExec.doExecute(commands.scala:74)
  at org.apache.spark.sql.execution.SparkPlan$$anonfun$execute$1.apply(SparkPlan.scala:114)
  at org.apache.spark.sql.execution.SparkPlan$$anonfun$execute$1.apply(SparkPlan.scala:114)
  at org.apache.spark.sql.execution.SparkPlan$$anonfun$executeQuery$1.apply(SparkPlan.scala:135)
  at org.apache.spark.rdd.RDDOperationScope$.withScope(RDDOperationScope.scala:151)
  at org.apache.spark.sql.execution.SparkPlan.executeQuery(SparkPlan.scala:132)
  at org.apache.spark.sql.execution.SparkPlan.execute(SparkPlan.scala:113)
  at org.apache.spark.sql.execution.QueryExecution.toRdd$lzycompute(QueryExecution.scala:87)
  at org.apache.spark.sql.execution.QueryExecution.toRdd(QueryExecution.scala:87)
  at org.apache.spark.sql.Dataset.&amp;lt;init&amp;gt;(Dataset.scala:185)
  at org.apache.spark.sql.Dataset$.ofRows(Dataset.scala:64)
  at org.apache.spark.sql.SparkSession.sql(SparkSession.scala:592)
  at org.apache.spark.sql.SQLContext.sql(SQLContext.scala:699)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Interesing to note: Access hive though SparkSession returns nothing, while HiveContext does return a description of the default DB that does not match the actual default DB&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;From Hue&lt;/P&gt;&lt;PRE&gt;default
Default&amp;nbsp;Hive&amp;nbsp;database
hdfs://&amp;lt;masked&amp;gt;/user/hive/warehouse
public
ROLE&lt;/PRE&gt;&lt;P&gt;The CDSW host has the right gateway roles installed, hive-site.xml is present with the spark config files.&lt;/P&gt;&lt;P&gt;Hive Metastore log does not register any access when&amp;nbsp;the workbench is trying to access Hive&lt;/P&gt;&lt;P&gt;No Kerberos involved&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I ran out of option to check, hence this post&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 11:55:24 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/CDSW-Can-t-access-hive-Tables-from-Scala-Workbench/m-p/57321#M17640</guid>
      <dc:creator>ChrisV</dc:creator>
      <dc:date>2022-09-16T11:55:24Z</dc:date>
    </item>
    <item>
      <title>Re: CDSW - Can't access hive Tables from Scala Workbench</title>
      <link>https://community.cloudera.com/t5/Support-Questions/CDSW-Can-t-access-hive-Tables-from-Scala-Workbench/m-p/57322#M17641</link>
      <description>&lt;P&gt;Hello Chris,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What are you trying to achieve? Why are you trying to run in local mode? Can you use the expected yarn client mode instead?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;From the documentation:&lt;/P&gt;&lt;P class="p"&gt;"Unlike PySpark or Sparklyr, you can access a SparkContext assigned to the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;spark&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;(SparkSession) and&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;sc(SparkContext) objects on console startup, just as when using the Spark shell."&lt;/P&gt;&lt;P class="p"&gt;&lt;A href="https://www.cloudera.com/documentation/data-science-workbench/latest/topics/cdsw_spark_and_scala.html" target="_blank"&gt;https://www.cloudera.com/documentation/data-science-workbench/latest/topics/cdsw_spark_and_scala.html&lt;/A&gt;&lt;/P&gt;&lt;P class="p"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p"&gt;Can you access to your hive tables&amp;nbsp;using the spark SparkSession object?&lt;/P&gt;&lt;P class="p"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p"&gt;Regards,&lt;/P&gt;&lt;P class="p"&gt;Peter&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jul 2017 11:06:36 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/CDSW-Can-t-access-hive-Tables-from-Scala-Workbench/m-p/57322#M17641</guid>
      <dc:creator>peter_ableda</dc:creator>
      <dc:date>2017-07-13T11:06:36Z</dc:date>
    </item>
    <item>
      <title>Re: CDSW - Can't access hive Tables from Scala Workbench</title>
      <link>https://community.cloudera.com/t5/Support-Questions/CDSW-Can-t-access-hive-Tables-from-Scala-Workbench/m-p/57325#M17642</link>
      <description>&lt;P&gt;Hi Peter,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The goal is to run Data Analysis using Spark where part of the data is stored in hive, The idea is to use the whole cluster to distribute the workload.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I missed the&amp;nbsp;fact that I was&amp;nbsp;running in local mode (As said it's a pilot, i'm totally new to Cloudera stack). I assumed that the workbench was by default in yarn mode. I'll dig in the doc again.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Trying to access hive using Sparksession object in my test was returning nothing. I'll try using yarn &amp;amp; report back&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks!&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jul 2017 11:33:00 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/CDSW-Can-t-access-hive-Tables-from-Scala-Workbench/m-p/57325#M17642</guid>
      <dc:creator>ChrisV</dc:creator>
      <dc:date>2017-07-13T11:33:00Z</dc:date>
    </item>
    <item>
      <title>Re: CDSW - Can't access hive Tables from Scala Workbench</title>
      <link>https://community.cloudera.com/t5/Support-Questions/CDSW-Can-t-access-hive-Tables-from-Scala-Workbench/m-p/57326#M17643</link>
      <description>&lt;P&gt;Hi Peter,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I updated my test code as follow&lt;/P&gt;&lt;PRE&gt;import org.apache.spark.sql.hive.HiveContext  

  
spark.catalog.listTables.show()

val sqlContext = new HiveContext(sc)

sqlContext.sql("describe database default").show
sqlContext.sql("describe formatted default.mytable").show
sc.version&lt;/PRE&gt;&lt;P&gt;the results &amp;nbsp;for SparkSession:&lt;/P&gt;&lt;PRE&gt;spark.catalog.listTables.show()
+----+--------+-----------+---------+-----------+
|name|database|description|tableType|isTemporary|
+----+--------+-----------+---------+-----------+
+----+--------+-----------+---------+-----------+&lt;/PRE&gt;&lt;P&gt;(There should be one table listed)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The result for HiveContext&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;sqlContext.sql("describe database default").show
+-------------------------+--------------------------+
|database_description_item|database_description_value|
+-------------------------+--------------------------+
|            Database Name|                   default|
|              Description|          default database|
|                 Location|      /user/hive/warehouse|
+-------------------------+--------------------------+

sqlContext.sql("describe formatted default.mytable").show
Name: org.apache.spark.sql.catalyst.analysis.NoSuchTableException
Message: Table or view 'mytable' not found in database 'default';
StackTrace:   at org.apache.spark.sql.catalyst.catalog.SessionCatalog.requireTableExists(SessionCatalog.scala:138)
  at org.apache.spark.sql.catalyst.catalog.SessionCatalog.getTableMetadata(SessionCatalog.scala:289)
  at org.apache.spark.sql.execution.command.DescribeTableCommand.run(tables.scala:437)
  at org.apache.spark.sql.execution.command.ExecutedCommandExec.sideEffectResult$lzycompute(commands.scala:58)
  at org.apache.spark.sql.execution.command.ExecutedCommandExec.sideEffectResult(commands.scala:56)
  at org.apache.spark.sql.execution.command.ExecutedCommandExec.doExecute(commands.scala:74)
  at org.apache.spark.sql.execution.SparkPlan$$anonfun$execute$1.apply(SparkPlan.scala:114)
  at org.apache.spark.sql.execution.SparkPlan$$anonfun$execute$1.apply(SparkPlan.scala:114)
  at org.apache.spark.sql.execution.SparkPlan$$anonfun$executeQuery$1.apply(SparkPlan.scala:135)
  at org.apache.spark.rdd.RDDOperationScope$.withScope(RDDOperationScope.scala:151)
  at org.apache.spark.sql.execution.SparkPlan.executeQuery(SparkPlan.scala:132)
  at org.apache.spark.sql.execution.SparkPlan.execute(SparkPlan.scala:113)
  at org.apache.spark.sql.execution.QueryExecution.toRdd$lzycompute(QueryExecution.scala:87)
  at org.apache.spark.sql.execution.QueryExecution.toRdd(QueryExecution.scala:87)
  at org.apache.spark.sql.Dataset.&amp;lt;init&amp;gt;(Dataset.scala:185)
  at org.apache.spark.sql.Dataset$.ofRows(Dataset.scala:64)
  at org.apache.spark.sql.SparkSession.sql(SparkSession.scala:592)
  at org.apache.spark.sql.SQLContext.sql(SQLContext.scala:699)&lt;/PRE&gt;&lt;P&gt;while&amp;nbsp;I do get an result for Describe Table, the description returned does not match the setting in Hive.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jul 2017 11:54:49 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/CDSW-Can-t-access-hive-Tables-from-Scala-Workbench/m-p/57326#M17643</guid>
      <dc:creator>ChrisV</dc:creator>
      <dc:date>2017-07-13T11:54:49Z</dc:date>
    </item>
    <item>
      <title>Re: CDSW - Can't access hive Tables from Scala Workbench</title>
      <link>https://community.cloudera.com/t5/Support-Questions/CDSW-Can-t-access-hive-Tables-from-Scala-Workbench/m-p/57327#M17644</link>
      <description>&lt;P&gt;Hi Chris,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can use the SparkSession object to query your Hive tables. You don't need to create a HiveContext.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;spark.catalog.listTables.show()

spark.sql("describe database default").show
spark.sql("describe formatted default.mytable").show&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't think that this change would fix your issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This doesn't seem like a problem with your CDSW installation. Could you execute the same commands from a Session terminal or directly on the CDSW host machine using the spark2-shell cli tool to verify this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you double check that a Hive gateway&amp;nbsp;is deployed to your CDSW host?&lt;/P&gt;&lt;P&gt;Can you show that the table exists from eg.&amp;nbsp;beeline?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jul 2017 12:19:38 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/CDSW-Can-t-access-hive-Tables-from-Scala-Workbench/m-p/57327#M17644</guid>
      <dc:creator>peter_ableda</dc:creator>
      <dc:date>2017-07-13T12:19:38Z</dc:date>
    </item>
    <item>
      <title>Re: CDSW - Can't access hive Tables from Scala Workbench</title>
      <link>https://community.cloudera.com/t5/Support-Questions/CDSW-Can-t-access-hive-Tables-from-Scala-Workbench/m-p/57336#M17645</link>
      <description>&lt;P&gt;Hi Peter,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;See the roles installed. (In case of : Hive GW is the second listed role)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Roles.PNG" style="width: 600px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/3177i3073C70127007EDC/image-size/large?v=v2&amp;amp;px=999" role="button" title="Roles.PNG" alt="Roles.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;From Spark2-shell (Workbench host)&lt;/P&gt;&lt;PRE&gt;Using Scala version 2.11.8 (Java HotSpot(TM) 64-Bit Server VM, Java 1.7.0_67)
Type in expressions to have them evaluated.
Type :help for more information.

scala&amp;gt; spark.catalog.listTables.show()
+----+--------+-----------+---------+-----------+
|name|database|description|tableType|isTemporary|
+----+--------+-----------+---------+-----------+
+----+--------+-----------+---------+-----------+&lt;/PRE&gt;&lt;P&gt;From HUE running in the CDH cluster (table datascience): the table exist, and can be queried from HUE, the returned data is correct&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="metastore.PNG" style="width: 600px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/3178iBACF9798ECCC1D1E/image-size/large?v=v2&amp;amp;px=999" role="button" title="metastore.PNG" alt="metastore.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Spark2-shell from a CDH node&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;scala&amp;gt; spark.catalog.listTables.show()

// Detected repl transcript. Paste more, or ctrl-D to finish.

+----+--------+-----------+---------+-----------+
|name|database|description|tableType|isTemporary|
+----+--------+-----------+---------+-----------+
+----+--------+-----------+---------+-----------+

scala&amp;gt; spark.sql("describe database default").show
+-------------------------+--------------------------+
|database_description_item|database_description_value|
+-------------------------+--------------------------+
|            Database Name|                   default|
|              Description|          default database|
|                 Location|      file:/log/clouder...|
+-------------------------+--------------------------+

scala&amp;gt; spark.sql("describe formatted default.datascience").show
org.apache.spark.sql.catalyst.analysis.NoSuchTableException: Table or view 'datascience' not found in database 'default';
  at org.apache.spark.sql.catalyst.catalog.SessionCatalog.requireTableExists(SessionCatalog.scala:138)
  at org.apache.spark.sql.catalyst.catalog.SessionCatalog.getTableMetadata(SessionCatalog.scala:289)
  at org.apache.spark.sql.execution.command.DescribeTableCommand.run(tables.scala:437)
  at org.apache.spark.sql.execution.command.ExecutedCommandExec.sideEffectResult$lzycompute(commands.scala:58)
  at org.apache.spark.sql.execution.command.ExecutedCommandExec.sideEffectResult(commands.scala:56)
  at org.apache.spark.sql.execution.command.ExecutedCommandExec.doExecute(commands.scala:74)
  at org.apache.spark.sql.execution.SparkPlan$$anonfun$execute$1.apply(SparkPlan.scala:114)
  at org.apache.spark.sql.execution.SparkPlan$$anonfun$execute$1.apply(SparkPlan.scala:114)
  at org.apache.spark.sql.execution.SparkPlan$$anonfun$executeQuery$1.apply(SparkPlan.scala:135)
  at org.apache.spark.rdd.RDDOperationScope$.withScope(RDDOperationScope.scala:151)
  at org.apache.spark.sql.execution.SparkPlan.executeQuery(SparkPlan.scala:132)
  at org.apache.spark.sql.execution.SparkPlan.execute(SparkPlan.scala:113)
  at org.apache.spark.sql.execution.QueryExecution.toRdd$lzycompute(QueryExecution.scala:87)
  at org.apache.spark.sql.execution.QueryExecution.toRdd(QueryExecution.scala:87)
  at org.apache.spark.sql.Dataset.&amp;lt;init&amp;gt;(Dataset.scala:185)
  at org.apache.spark.sql.Dataset$.ofRows(Dataset.scala:64)
  at org.apache.spark.sql.SparkSession.sql(SparkSession.scala:592)
  ... 48 elided


&lt;/PRE&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jul 2017 14:14:26 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/CDSW-Can-t-access-hive-Tables-from-Scala-Workbench/m-p/57336#M17645</guid>
      <dc:creator>ChrisV</dc:creator>
      <dc:date>2017-07-13T14:14:26Z</dc:date>
    </item>
    <item>
      <title>Re: CDSW - Can't access hive Tables from Scala Workbench</title>
      <link>https://community.cloudera.com/t5/Support-Questions/CDSW-Can-t-access-hive-Tables-from-Scala-Workbench/m-p/57717#M17646</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I fixed it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the Spark2 Configuration Screen (In Cloudera Manager for the CDH cluster), Hiver Service was set to none&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 600px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/3217i3EA3D6866C63FB0A/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I set it to Hive and CDSW is now working&amp;nbsp;as expected.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jul 2017 14:04:16 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/CDSW-Can-t-access-hive-Tables-from-Scala-Workbench/m-p/57717#M17646</guid>
      <dc:creator>ChrisV</dc:creator>
      <dc:date>2017-07-20T14:04:16Z</dc:date>
    </item>
  </channel>
</rss>

