I would like to use Spark on analytics engine from a Jupyter notebook in Watson Studio to be able to read and write to Hive tables, but it isn't clear how I can do this by just reading the Spark documentation. The reason that it isn't clear is that IBM Analytics Engine comes pre-configured with Spark and does not provide root access.
I have found some posts online for generic hadoop that describe creating a hive.xml with the metastore location, but it isn't clear how this is translated to the IBM Analytics Engine environment. For example: Unable to write data on hive using spark
Here is an example using scala ...
Skip the first two steps if you are running spark directly on the Analytics Engine cluster.
Create a Watson Studio Project and associate with an Analytics Engine service.
Create a scala Notebook that uses the Analytics Engine Spark service
Enter the following scala code to retrieve the HiveContext and list the Hive databases (if any)