This error occurs when you are trying to call a SparkSession object as a function.

Example:

from pyspark.sql import SparkSession

spark = SparkSession.builder.appName("myApp").getOrCreate()

df = spark("myTable").read.csv("path/to/csv")

In the above example, the error occurs because spark is being called as a function with the argument "myTable", which is not a valid function call on a SparkSession object.

To fix this error, make sure you are calling the appropriate methods on the SparkSession object, such as read or createDataFrame.

Example:

from pyspark.sql import SparkSession

spark = SparkSession.builder.appName("myApp").getOrCreate()

df = spark.read.csv("path/to/csv")
``
SparkSession object is not callable

原文地址: https://www.cveoy.top/t/topic/fmtO 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录