2.06 - getDatasetFromSql - Teradata QueryGrid

Teradata® QueryGrid™ Installation and User Guide

Product
Teradata QueryGrid
Release Number
2.06
Published
September 2018
Language
English (United States)
Last Update
2018-11-26
dita:mapPath
blo1527621308305.ditamap
dita:ditavalPath
ft:empty

Use the getDataSetFromSql() method to perform a lazy execution of a SELECT query involving non-native tables. For example:

scala> ForeignServer.getDatasetFromSql("select * from default.nn1")
res0: org.apache.spark.sql.Dataset[org.apache.spark.sql.Row] = [number: int, name: string]

The query result DataSet (res0 in the above example) is used like any other Spark SQL DataSet object and is only evaluated when an action is called.