Tidb
Descriptionâ
Read data from Tidb.
tip
Engine Supported and plugin name
- Spark: Tidb
- Flink
Env Optionsâ
name | type | required | default value |
---|---|---|---|
spark.tispark.pd.addresses | string | yes | - |
spark.sql.extensions | string | yes | org.apache.spark.sql.TiExtensions |
spark.tispark.pd.addresses [string]â
your pd servers
spark.sql.extensions [string]â
default value : org.apache.spark.sql.TiExtensions
Optionsâ
name | type | required | default value |
---|---|---|---|
database | string | yes | - |
pre_sql | string | yes | - |
database [string]â
Tidb database
pre_sql [string]â
sql script
common options [string]â
Source Plugin common parameters, refer to Source Plugin for details
Exampleâ
env {
spark.tispark.pd.addresses = "192.168.0.1:2379"
spark.sql.extensions = "org.apache.spark.sql.TiExtensions"
}
source {
tidb {
database = "test"
pre_sql = "select * from table1"
}
}