Skip to content

TiSpark FAQ

Leon Yang edited this page Jul 15, 2022 · 7 revisions

Error

[Error] NoSuchDatabaseException when upgrade to TiSpark 3.x

With TiSpark 3.x, you must to specify catalog.

//1. with catalog prefix
spark.sql("select from tidb_catalog.$database.table")

//2. use catalog
spark.sql("use tidb_catalog")
spark.sql("select from $database.table")

https://github.com/pingcap/tispark/wiki/Getting-Started#use-with-spark_catalog

[Error] java.lang.NoSuchMethodError: scala.Function1.$init$(Lscala/Function1;)V

Check the scala version and choose the right version of TiSpark image https://github.com/pingcap/tispark/wiki/Getting-TiSpark#choose-the-version-of-tispark

[Error]Batch scan are not supported / Table does not support reads

It may occur when you forget to configure the following configuration

spark.sql.extensions  org.apache.spark.sql.TiExtensions
spark.tispark.pd.addresses  ${your_pd_adress}

Others

How to upgrade from Spark 2.1 to Spark 2.3/2.4

For the users of Spark 2.1 who wish to upgrade to the latest TiSpark version on Spark 2.3/2.4, download or install Spark 2.3+/2.4+ by following the instructions on Apache Spark Site and overwrite the old spark version in $SPARK_HOME.

Clone this wiki locally