2.10 - Validating a Spark SQL-to-TargetConnector Link - Teradata QueryGrid

Teradata® QueryGrid™ Installation and User Guide

prodname
Teradata QueryGrid
vrm_release
2.10
created_date
September 2019
category
Administration
Configuration
Installation
User Guide
featnum
B035-5991-099K
Complete these steps to verify a Spark SQL-to-TargetConnector link (where TargetConnector is any type of target connector).
  1. Make sure you have completed all steps described in Configuring a Foreign Server for a Spark SQL-to-Target Connector.
  2. Load the previously created foreign server if the spark-shell session is no longer active.

    For example:

    scala> val s1 = new ForeignServer("fs1")
    Loading existing Foreign Server...
    Foreign Server ready to use
    s1: tdqg.ForeignServer = tdqg.ForeignServer@5feff876
  3. Create a non-native table that refers to an existing remote table.

    For example:

    scala> s1.create("test_nn_table", "user1.players")
  4. Describe the non-native table created and verify the result.

    For example:

    scala> s1.describe("test_nn_table")
    +--------+---------+-------+
    |col_name|data_type|comment|
    +--------+---------+-------+
    |number  |int      |null   |
    |name    |string   |null   |
    +--------+---------+-------+
    When a non-native table is created without specifying a database name (as in the above example), the table is assumed to be temporary and automatically disappears once the current session ends. In order to create a permanent non-native table, you must specify a database name.