nxcals.api.custom.data.services.SparkSession.tvf

property SparkSession.tvf: TableValuedFunction

Returns a tvf.TableValuedFunction that can be used to call a table-valued function (TVF).

Added in version 4.0.0.

Notes

This API is evolving.

Return type:

tvf.TableValuedFunction

Examples

>>> spark.tvf
<pyspark...TableValuedFunction object ...>
>>> import pyspark.sql.functions as sf
>>> spark.tvf.explode(sf.array(sf.lit(1), sf.lit(2), sf.lit(3))).show()
+---+
|col|
+---+
|  1|
|  2|
|  3|
+---+