jdbc-protolib/src/main/java/com/streamsets/pipeline/stage/processor/jdbctee/JdbcTeeProcessor.java
@Override
  protected List<ConfigIssue> init() {
    // Validate configuration values and open any required resources.
    List<ConfigIssue> issues = super.init();

    errorRecordHandler = new DefaultErrorRecordHandler(getContext());
    Processor.Context context = getContext();

    issues = hikariConfigBean.validateConfigs(context, issues);

    if (hikariConfigBean.getConnectionString().toLowerCase().startsWith("jdbc:sqlserver") && useMultiRowOp) {
      issues.add(getContext().createConfigIssue(Groups.JDBC.name(), MULTI_ROW_OP, JdbcErrors.JDBC_57));
    }

    if (dynamicTableName) {
      tableNameVars = getContext().createELVars();
      tableNameEval = context.createELEval(JdbcUtil.TABLE_NAME);
      ELUtils.validateExpression(
          tableNameTemplate,
          getContext(),
          Groups.JDBC.getLabel(),
          JdbcUtil.TABLE_NAME,
          JdbcErrors.JDBC_26,
          issues
      );
    }

    if (issues.isEmpty() && null == dataSource) {
      try {
        dataSource = jdbcUtil.createDataSourceForWrite(
            hikariConfigBean, schema,
            tableNameTemplate,
            caseSensitive,
            issues,
            customMappings,
            getContext()
        );
      } catch (RuntimeException | SQLException | StageException e) {
        LOG.debug("Could not connect to data source", e);
        issues.add(getContext().createConfigIssue(Groups.JDBC.name(), CONNECTION_STRING, JdbcErrors.JDBC_00, e.toString()));
      }
    }

    // If issues is not empty, the UI will inform the user of each configuration issue in the list.
    return issues;
  }
@Override
  protected List<ConfigIssue> init() {
    // Validate configuration values and open any required resources.
    List<ConfigIssue> issues = super.init();

    errorRecordHandler = new DefaultErrorRecordHandler(getContext());
    Processor.Context context = getContext();

    issues = hikariConfigBean.validateConfigs(context, issues);

    if (hikariConfigBean.getConnectionString().toLowerCase().startsWith("jdbc:sqlserver") && useMultiRowOp) {
      issues.add(getContext().createConfigIssue(Groups.JDBC.name(), MULTI_ROW_OP, JdbcErrors.JDBC_57));
    }

    if (dynamicTableName) {
      tableNameVars = getContext().createELVars();
      tableNameEval = context.createELEval(JdbcUtil.TABLE_NAME);
      ELUtils.validateExpression(
          tableNameTemplate,
          getContext(),
          Groups.JDBC.getLabel(),
          JdbcUtil.TABLE_NAME,
          JdbcErrors.JDBC_26,
          issues
      );
    }

    if (issues.isEmpty() && null == dataSource) {
      try {
        dataSource = jdbcUtil.createDataSourceForWrite(
            hikariConfigBean, schema,
            tableNameTemplate,
            caseSensitive,
            issues,
            customMappings,
            getContext()
        );
      } catch (RuntimeException | SQLException | StageException e) {
        LOG.debug("Could not connect to data source", e);
        issues.add(getContext().createConfigIssue(Groups.JDBC.name(), CONNECTION_STRING, JdbcErrors.JDBC_00, e.toString()));
      }
    }

    // If issues is not empty, the UI will inform the user of each configuration issue in the list.
    return issues;
  }
@ Override protected List < ConfigIssue > init ( ) { // Validate configuration values and open any required resources. List < ConfigIssue > issues = super . init ( ) ; errorRecordHandler = new DefaultErrorRecordHandler ( getContext ( ) ) ; Processor . Context context = getContext ( ) ; issues = hikariConfigBean . validateConfigs ( context , issues ) ; if ( hikariConfigBean . getConnectionString ( ) . toLowerCase ( ) . startsWith ( "jdbc:sqlserver" ) && useMultiRowOp ) { issues . add ( getContext ( ) . createConfigIssue ( Groups . JDBC . name ( ) , MULTI_ROW_OP , JdbcErrors . JDBC_57 ) ) ; } if ( dynamicTableName ) { tableNameVars = getContext ( ) . createELVars ( ) ; tableNameEval = context . createELEval ( JdbcUtil . TABLE_NAME ) ; ELUtils . validateExpression ( tableNameTemplate , getContext ( ) , Groups . JDBC . getLabel ( ) , JdbcUtil . TABLE_NAME , JdbcErrors . JDBC_26 , issues ) ; } if ( issues . isEmpty ( ) && null == dataSource ) { try { dataSource = jdbcUtil . createDataSourceForWrite ( hikariConfigBean , schema , tableNameTemplate , caseSensitive , issues , customMappings , getContext ( ) ) ; } catch ( RuntimeException | SQLException | StageException e ) { LOG . debug ( "Could not connect to data source" , e ) ; issues . add ( getContext ( ) . createConfigIssue ( Groups . JDBC . name ( ) , CONNECTION_STRING , JdbcErrors . JDBC_00 , e . toString ( ) ) ) ; } } // If issues is not empty, the UI will inform the user of each configuration issue in the list. return issues ; }
{@inheritDoc}
{