Use Java API Introducing Maven dependency Perform the business logic try (Connection conn = dataSource.getConnection()) { // use ShardingSphereDataSource conn.setAutoCommit(false); ps.setObject(1, 1000); ps.setObject(2, "init"); conn.commit();