Start Scala REPL | Spark SQL Connector | Teradata QueryGrid - Starting Scala REPL - Teradata QueryGrid

Teradata® QueryGrid™ Installation and User Guide

Product
Teradata QueryGrid
Release Number
2.19
Published
July 2022
Language
English (United States)
Last Update
2022-07-28
dita:mapPath
jpf1654813554544.ditamap
dita:ditavalPath
ft:empty
dita:id
lxg1591800469257
Product Category
Analytical Ecosystem
The supported client for interacting with the Spark SQL initiator is the Scala Read-Eval-Print-Loop (REPL), referred to as the spark-shell. In order to use the Spark SQL initiator, spark-shell must be started using the following JAR file:
  • spark-loaderfactory
  1. Log on to the node you want to start spark-shell.
  2. Locate the connector path at /opt/teradata/tdqg/connector/tdqg-spark-connector/<version>/lib/)
  3. Add the JAR file.
  4. Start the spark-shell.
    The following is an example path for starting spark-shell:
    spark-shell --jars /opt/teradata/tdqg/connector/tdqg-spark-connector/
    version/lib/spark-loaderfactory-version.jar --master yarn
    When using CDH clusters, use the spark2-shell command name instead of spark-shell.
    When using a cluster that has Scala 2.12, such as Dataproc 1.5 or later, use spark-loaderfactory-scala212 as shown in the following example:
    spark-shell --jars /opt/teradata/tdqg/connector/tdqg-spark-connector/version/lib/spark-loaderfactory-scala212-version.jar --master yarn