Class CsvInputHelper

java.lang.Object
org.pentaho.di.trans.step.BaseStepHelper
org.pentaho.di.trans.steps.csvinput.CsvInputHelper
All Implemented Interfaces:
StepHelperInterface, CsvInputAwareHelper

public class CsvInputHelper extends BaseStepHelper implements CsvInputAwareHelper
Helper class for CsvInput step providing UI-triggered action support.
  • Constructor Details

    • CsvInputHelper

      public CsvInputHelper(CsvInputMeta csvInputMeta)
  • Method Details

    • handleStepAction

      protected org.json.simple.JSONObject handleStepAction(String method, TransMeta transMeta, Map<String,String> queryParams)
      Handles step-specific actions for CsvInput.
      Specified by:
      handleStepAction in class BaseStepHelper
      Parameters:
      method - The name of the method to execute.
      transMeta - The transformation metadata associated with the step.
      queryParams - A map of query parameters for the action.
      Returns:
      A JSON object containing the action status and any additional response data.
    • getFields

      public org.json.simple.JSONObject getFields(TransMeta transMeta, Map<String,String> queryParams)
      Retrieves the fields from the CSV file and returns them as a JSON object. This method contains code extracted from textfileinput/TextFileCSVImportProgressDialog class to get Fields data and Fields summary statistics.
      Parameters:
      transMeta - The transformation metadata associated with the step.
      queryParams - A map of query parameters for the action.
      Returns:
      A JSON object containing the fields and summary.
    • getInputStream

      public InputStream getInputStream(TransMeta transMeta, CsvInputAwareMeta meta)
      Retrieves the input stream for the CSV file.
      Specified by:
      getInputStream in interface CsvInputAwareHelper
      Parameters:
      transMeta - The transformation metadata.
      meta - The CSV input metadata.
      Returns:
      The input stream for the file.
    • logChannel

      public org.pentaho.di.core.logging.LogChannelInterface logChannel()
      Specified by:
      logChannel in interface CsvInputAwareHelper