Complete these steps to verify a Spark SQL-to-Teradata Connector link.
- Make sure you have completed all steps described in Configuring a Foreign Server for Spark SQL-to-Teradata.
- 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
- Create a non-native table that refers to an existing remote table.
For example:
scala> s1.create("test_nn_table", "user1.players")
- 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 previous 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.