Validate a Spark SQL-to-Teradata Connector Link | Teradata QueryGrid - Validating a Spark SQL-to-Teradata Connector Link - 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
Complete these steps to verify a Spark SQL-to-Teradata Connector link.
  1. Make sure you have completed all steps described in Configuring a Foreign Server for Spark SQL-to-Teradata.
  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 when the current session ends. In order to create a permanent non-native table, you must specify a database name.