产品名称找不到数据库类型:[SPARK SQL]
我在将弹簧批量与数据链球协会连接时面临此问题。
这就是我创建数据源的方式,
@Bean(name = "dataSource")
public DataSource dataSource(){
DriverManagerDataSource source= new DriverManagerDataSource();
source.setUrl("URL");
source.setUsername("userName");
source.setPassword("Password");
source.setDriverClassName("com.simba.spark.jdbc41.Driver");
return driverManagerDataSource;
}
这是我在进一步调试时在春季批处理项目读取器中读取它的方式
JdbcTemplate jdbcTemplate = new JdbcTemplate(dataSource);
List<Employee> employeeData= jdbcTemplate.query("select * from employee", new EmployeeMapper());
,我可以将“ databaseproductname”视为“ spark sql”,在弹簧批处理和spring batch
DERBY("Apache Derby"),
DB2("DB2"),
DB2VSE("DB2VSE"),
DB2ZOS("DB2ZOS"),
DB2AS400("DB2AS400"),
HSQL("HSQL Database Engine"),
SQLSERVER("Microsoft SQL Server"),
MYSQL("MySQL"),
ORACLE("Oracle"),
POSTGRES("PostgreSQL"),
SYBASE("Sybase"),
H2("H2"),
SQLITE("SQLite");
和我会发现此错误数据库的产品名称:[SPARK SQL]
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
默认情况下不支持Spark SQL。如果您认为Spring Batch提供的DDL脚本之一足够接近以激发SQL,则可以使用
请检查有关非标准作业存储库的配置的更多详细信息。
Spark SQL is not supported by default. If you think one of the DDL scripts provided by Spring Batch is close enough to Spark SQL, you can set the database type using JobRepositoryFactoryBean#setDatabaseType.
Please check Non-standard Database Types in a Repository for more details about the configuration of non standard job repositories.