jdbc-protolib/src/main/java/com/streamsets/pipeline/lib/jdbc/multithread/TableContextUtil.java
private void populateInitialOffset(
      PushSource.Context context,
      List<Stage.ConfigIssue> issues,
      Map<String, String> configuredColumnToInitialOffset,
      TableJdbcELEvalContext tableJdbcELEvalContext,
      Map<String, String> offsetColumnToStartOffset
  ) throws StageException {
    for (Map.Entry<String, String> partitionColumnInitialOffsetEntry : configuredColumnToInitialOffset.entrySet()) {
      String value;
      try {
        value = tableJdbcELEvalContext.evaluateAsString(
            "offsetColumnToInitialOffsetValue",
            partitionColumnInitialOffsetEntry.getValue()
        );
        if (value == null) {
          issues.add(context.createConfigIssue(
              Groups.TABLE.name(),
              TableJdbcConfigBean.TABLE_CONFIG,
              JdbcErrors.JDBC_73,
              partitionColumnInitialOffsetEntry.getValue(),
              Utils.format("Expression returned date as null. Check Expression")
          ));
          return;
        }
      } catch (ELEvalException e) {
        issues.add(context.createConfigIssue(
            Groups.TABLE.name(),
            TableJdbcConfigBean.TABLE_CONFIG,
            JdbcErrors.JDBC_73,
            partitionColumnInitialOffsetEntry.getValue(),
            e
        ));
        return;
      }
      offsetColumnToStartOffset.put(
          partitionColumnInitialOffsetEntry.getKey(),
          value
      );
    }
  }
private void populateInitialOffset(
      PushSource.Context context,
      List<Stage.ConfigIssue> issues,
      Map<String, String> configuredColumnToInitialOffset,
      TableJdbcELEvalContext tableJdbcELEvalContext,
      Map<String, String> offsetColumnToStartOffset
  ) throws StageException {
    for (Map.Entry<String, String> partitionColumnInitialOffsetEntry : configuredColumnToInitialOffset.entrySet()) {
      String value;
      try {
        value = tableJdbcELEvalContext.evaluateAsString(
            "offsetColumnToInitialOffsetValue",
            partitionColumnInitialOffsetEntry.getValue()
        );
        if (value == null) {
          issues.add(context.createConfigIssue(
              Groups.TABLE.name(),
              TableJdbcConfigBean.TABLE_CONFIG,
              JdbcErrors.JDBC_73,
              partitionColumnInitialOffsetEntry.getValue(),
              Utils.format("Expression returned date as null. Check Expression")
          ));
          return;
        }
      } catch (ELEvalException e) {
        issues.add(context.createConfigIssue(
            Groups.TABLE.name(),
            TableJdbcConfigBean.TABLE_CONFIG,
            JdbcErrors.JDBC_73,
            partitionColumnInitialOffsetEntry.getValue(),
            e
        ));
        return;
      }
      offsetColumnToStartOffset.put(
          partitionColumnInitialOffsetEntry.getKey(),
          value
      );
    }
  }
private void populateInitialOffset ( PushSource . Context context , List < Stage . ConfigIssue > issues , Map < String , String > configuredColumnToInitialOffset , TableJdbcELEvalContext tableJdbcELEvalContext , Map < String , String > offsetColumnToStartOffset ) throws StageException { for ( Map . Entry < String , String > partitionColumnInitialOffsetEntry : configuredColumnToInitialOffset . entrySet ( ) ) { String value ; try { value = tableJdbcELEvalContext . evaluateAsString ( "offsetColumnToInitialOffsetValue" , partitionColumnInitialOffsetEntry . getValue ( ) ) ; if ( value == null ) { issues . add ( context . createConfigIssue ( Groups . TABLE . name ( ) , TableJdbcConfigBean . TABLE_CONFIG , JdbcErrors . JDBC_73 , partitionColumnInitialOffsetEntry . getValue ( ) , Utils . format ( "Expression returned date as null. Check Expression" ) ) ) ; return ; } } catch ( ELEvalException e ) { issues . add ( context . createConfigIssue ( Groups . TABLE . name ( ) , TableJdbcConfigBean . TABLE_CONFIG , JdbcErrors . JDBC_73 , partitionColumnInitialOffsetEntry . getValue ( ) , e ) ) ; return ; } offsetColumnToStartOffset . put ( partitionColumnInitialOffsetEntry . getKey ( ) , value ) ; } }
Evaluate ELs in Initial offsets as needed and populate the final String representation of initial offsets
in {@param offsetColumnToStartOffset}
Evaluate ELs in Initial offsets as needed and populate the final String representation of initial offsets in {