nxcals.api.extraction.data.builders.SparkSession.table

SparkSession.table(tableName: str) DataFrame

Returns the specified table as a DataFrame.

New in version 2.0.0.

Return type:

DataFrame

Examples

>>> df.createOrReplaceTempView("table1")
>>> df2 = spark.table("table1")
>>> sorted(df.collect()) == sorted(df2.collect())
True