TiSpark Insert Select错误 not enough data columns

版本:TiDB V6.2

问题:
基于SparkSQL执行insert into…select… 报错,无论什么表都只提示源表只有3个列,错误信息如下:
Cannot write to ‘us_stock_ads.ca-suspension’, not enough data columns:
Table columns: ‘symbol’, ‘startdate’, ‘enddate’, ‘reason’, ‘duration’
Data columns: ‘symbol’, ‘reason’, ‘duration’ 。

执行SQL:
insert into us_stock_ads.ca-suspension
(symbol,
startDate,
endDate,
reason,
duration)
SELECT replace(replace(replace(replace(STOCKCODE,’.F’,’.US’),’.A’,’.US’),’.O’,’.US’),’.N’,’.US’) as symbol,
SuspensionStartDate as startDate,
SuspensionEndDate as endDate,
ResumptionReason as reason,
SuspensionDuration as duration
FROM us_stock.ccs_SuspensionResumption

spark-defaults.conf文件内容:
spark.tispark.pd.addresses x.x.x.x:2379
spark.sql.extensions org.apache.spark.sql.TiExtensions
spark.sql.catalog.tidb_catalog org.apache.spark.sql.catalyst.catalog.TiCatalog
spark.sql.catalog.tidb_catalog.pd.addresses x.x.x.x:2379
spark.tispark.write.allow_spark_sql true

用use切库了么?tidb_catalog这个catalog在哪利用的?

切库了,目前看是tispark不支持 insert select 的sql?

参考一下:关于TiSpark的几种使用方式以及常见错误