-
Notifications
You must be signed in to change notification settings - Fork 246
TiSpark FAQ
Leon Yang edited this page Jul 15, 2022
·
7 revisions
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
Check the scala version and choose the right version of TiSpark https://github.com/pingcap/tispark/wiki/Getting-TiSpark#choose-the-version-of-tispark
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}
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
.