Class CsvInputHelper
java.lang.Object
org.pentaho.di.trans.step.BaseStepHelper
org.pentaho.di.trans.steps.csvinput.CsvInputHelper
- All Implemented Interfaces:
StepHelperInterface,CsvInputAwareHelper
Helper class for CsvInput step providing UI-triggered action support.
-
Field Summary
Fields inherited from class org.pentaho.di.trans.step.BaseStepHelper
IS_TRANS_REFERENCE, IS_VALID_REFERENCE, log, REFERENCE_PATH, SEPARATORFields inherited from interface org.pentaho.di.trans.step.StepHelperInterface
ACTION_STATUS, FAILURE_METHOD_NOT_FOUND_RESPONSE, FAILURE_RESPONSE, STATUS, SUCCESS_RESPONSE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.json.simple.JSONObjectRetrieves the fields from the CSV file and returns them as a JSON object.getInputStream(TransMeta transMeta, CsvInputAwareMeta meta) Retrieves the input stream for the CSV file.protected org.json.simple.JSONObjectHandles step-specific actions for CsvInput.org.pentaho.di.core.logging.LogChannelInterfaceMethods inherited from class org.pentaho.di.trans.step.BaseStepHelper
getReferencePath, isFailedResponse, stepAction, validateAndPutReferenceStatusMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.pentaho.di.trans.steps.common.CsvInputAwareHelper
convertFieldsToJsonArray, getBufferedReader, getFieldNames, getFieldNamesImpl, getReader, getStringFromRow, logError, logError, massageFieldName
-
Constructor Details
-
CsvInputHelper
-
-
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:
handleStepActionin classBaseStepHelper- 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
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
Retrieves the input stream for the CSV file.- Specified by:
getInputStreamin interfaceCsvInputAwareHelper- 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:
logChannelin interfaceCsvInputAwareHelper
-