public class TextFileInputMeta extends BaseFileInputMeta<BaseFileInputAdditionalField,BaseFileInputFiles,BaseFileField> implements StepMetaInterface, ResolvableResource
Modifier and Type | Class and Description |
---|---|
static class |
TextFileInputMeta.Content |
Modifier and Type | Field and Description |
---|---|
TextFileInputMeta.Content |
content |
String |
errorCountField
The name of the field that will contain the number of errors in the row
|
String |
errorFieldsField
The name of the field that will contain the names of the fields that generated errors, separated by ,
|
boolean |
errorLineSkipped
If error line are skipped, you can replay without introducing doubles.
|
String |
errorTextField
The name of the field that will contain the error texts, separated by CR
|
static int |
FILE_FORMAT_DOS |
static int |
FILE_FORMAT_MIXED |
static int |
FILE_FORMAT_UNIX |
static int |
FILE_TYPE_CSV |
static int |
FILE_TYPE_FIXED |
additionalOutputFields, errorHandling, inputFields, inputFiles, NO, RequiredFilesCode, RequiredFilesDesc, YES
servletOutput
attributes, databases, ioMeta, log, loggingObject, parentStepMeta, repository, STEP_ATTRIBUTES_FILE
Constructor and Description |
---|
TextFileInputMeta() |
Modifier and Type | Method and Description |
---|---|
void |
allocate(int nrfiles,
int nrfields,
int nrfilters) |
void |
allocateFiles(int nrFiles) |
void |
check(List<CheckResultInterface> remarks,
TransMeta transMeta,
StepMeta stepMeta,
RowMetaInterface prev,
String[] input,
String[] output,
RowMetaInterface info,
VariableSpace space,
Repository repository,
org.pentaho.metastore.api.IMetaStore metaStore)
Checks the settings of this step and puts the findings in a remarks List.
|
Object |
clone()
Make an exact copy of this step, make sure to explicitly copy Collections etc.
|
String |
exportResources(VariableSpace space,
Map<String,ResourceDefinition> definitions,
ResourceNamingInterface resourceNamingInterface,
Repository repository,
org.pentaho.metastore.api.IMetaStore metaStore)
Since the exported transformation that runs this will reside in a ZIP file, we can't reference files relatively.
|
String |
getAcceptingField()
Required for the Data Lineage.
|
StepMeta |
getAcceptingStep()
Required for the Data Lineage.
|
String |
getAcceptingStepName()
Required for the Data Lineage.
|
String |
getEncoding() |
String |
getErrorCountField() |
String |
getErrorFieldsField() |
String |
getErrorTextField() |
void |
getFields(RowMetaInterface inputRowMeta,
String name,
RowMetaInterface[] info,
StepMeta nextStep,
VariableSpace space)
Deprecated.
|
void |
getFields(RowMetaInterface row,
String name,
RowMetaInterface[] info,
StepMeta nextStep,
VariableSpace space,
Repository repository,
org.pentaho.metastore.api.IMetaStore metaStore)
Gets the fields.
|
int |
getFileFormatTypeNr() |
String[] |
getFileName() |
String[] |
getFilePaths(VariableSpace space) |
int |
getFileTypeNr() |
TextFileFilter[] |
getFilter() |
String[] |
getInfoSteps() |
String |
getLength() |
String |
getLookupStepname() |
String |
getRequiredFilesDesc(String tt) |
StepInterface |
getStep(StepMeta stepMeta,
StepDataInterface stepDataInterface,
int cnr,
TransMeta transMeta,
Trans trans)
Get the executing step, needed by Trans to launch a step.
|
StepDataInterface |
getStepData()
Get a new instance of the appropriate data class.
|
FileInputList |
getTextFileList(VariableSpace space) |
String |
getXML()
Produces the XML string that describes this step's information.
|
boolean |
isAcceptingFilenames()
Required for the Data Lineage.
|
boolean |
isErrorLineSkipped() |
protected String |
loadSource(Node filenode,
Node filenamenode,
int i,
org.pentaho.metastore.api.IMetaStore metaStore) |
protected String |
loadSourceRep(Repository rep,
ObjectId id_step,
int i,
org.pentaho.metastore.api.IMetaStore metaStore) |
void |
loadXML(Node stepnode,
List<DatabaseMeta> databases,
org.pentaho.metastore.api.IMetaStore metaStore)
Load the values for this step from an XML Node
|
void |
readRep(Repository rep,
org.pentaho.metastore.api.IMetaStore metaStore,
ObjectId id_step,
List<DatabaseMeta> databases)
Read the steps information from a Kettle repository
|
void |
resolve()
Resolves resource data elements variables and temporary references.
|
void |
saveRep(Repository rep,
org.pentaho.metastore.api.IMetaStore metaStore,
ObjectId id_transformation,
ObjectId id_step)
Save the steps data into a Kettle repository
|
protected void |
saveSource(StringBuilder retVal,
String source) |
protected void |
saveSourceRep(Repository rep,
ObjectId id_transformation,
ObjectId id_step,
int i,
String fileName) |
void |
searchInfoAndTargetSteps(List<StepMeta> steps)
Change step names into step objects to allow them to be name-changed etc.
|
void |
setAcceptingStep(StepMeta acceptingStep) |
void |
setDefault()
Set default values
|
void |
setErrorCountField(String errorCountField) |
void |
setErrorFieldsField(String errorFieldsField) |
void |
setErrorLineSkipped(boolean errorLineSkipped) |
void |
setErrorTextField(String errorTextField) |
void |
setFileName(String[] fileName) |
void |
setFileNameForTest(String[] fileName) |
void |
setFilter(TextFileFilter[] filter) |
void |
setLength(String length) |
boolean |
supportsErrorHandling() |
getFileInputList, getFilePaths, getInputFields, getRequiredFilesCode, getResourceDependencies, inputFiles_fileRequired, inputFiles_includeSubFolders, inputFiles_includeSubFolders
passDataToServletOutput, writesToFile
analyseImpact, analyseImpact, cancelQueries, check, check, createEntry, excludeFromCopyDistributeVerification, excludeFromRowLayoutVerification, exportResources, extractStepMetadataEntries, findAttribute, findParent, findParentEntry, getActiveReferencedObjectDescription, getDescription, getDialogClassName, getLog, getLogChannelId, getName, getObjectCopy, getObjectId, getObjectRevision, getObjectType, getOptionalStreams, getParent, getParentStepMeta, getReferencedObjectDescriptions, getRepCode, getRepositoryDirectory, getRequiredFields, getRequiredFields, getSQLStatements, getSQLStatements, getStepInjectionMetadataEntries, getStepIOMeta, getStepMetaInjectionInterface, getSupportedTransformationTypes, getTableFields, getTooltip, getUsedArguments, getUsedDatabaseConnections, getUsedLibraries, getXmlCode, handleStreamSelection, hasChanged, hasRepositoryReferences, isBasic, isDebug, isDetailed, isReferencedObjectEnabled, isRowLevel, loadReferencedObject, loadReferencedObject, loadStepAttributes, loadXML, loadXML, logBasic, logBasic, logDebug, logDebug, logDetailed, logDetailed, logError, logError, logError, logMinimal, logMinimal, logRowlevel, logRowlevel, lookupRepositoryReferences, readRep, readRep, resetStepIoMeta, saveRep, setChanged, setChanged, setParentStepMeta
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
analyseImpact, analyseImpact, cancelQueries, check, cleanAfterHopFromRemove, excludeFromCopyDistributeVerification, excludeFromRowLayoutVerification, exportResources, extractStepMetadataEntries, getActiveReferencedObjectDescription, getDialogClassName, getOptionalStreams, getParentStepMeta, getReferencedObjectDescriptions, getRequiredFields, getResourceDependencies, getSQLStatements, getSQLStatements, getStepIOMeta, getStepMetaInjectionInterface, getSupportedTransformationTypes, getTableFields, getUsedArguments, getUsedDatabaseConnections, getUsedLibraries, handleStreamSelection, hasChanged, hasRepositoryReferences, isReferencedObjectEnabled, loadReferencedObject, loadXML, lookupRepositoryReferences, passDataToServletOutput, readRep, resetStepIoMeta, saveRep, setChanged, setParentStepMeta
public static final int FILE_FORMAT_DOS
public static final int FILE_FORMAT_UNIX
public static final int FILE_FORMAT_MIXED
public static final int FILE_TYPE_CSV
public static final int FILE_TYPE_FIXED
public TextFileInputMeta.Content content
public String errorCountField
public String errorFieldsField
public String errorTextField
public boolean errorLineSkipped
public String[] getFileName()
public void setFileName(String[] fileName)
fileName
- The fileName to set.public TextFileFilter[] getFilter()
public void setFilter(TextFileFilter[] filter)
filter
- The array of filters to usepublic void loadXML(Node stepnode, List<DatabaseMeta> databases, org.pentaho.metastore.api.IMetaStore metaStore) throws KettleXMLException
StepMetaInterface
loadXML
in interface StepMetaInterface
loadXML
in class BaseStepMeta
stepnode
- the Node to get the info fromdatabases
- The available list of databases to reference tometaStore
- the metastore to optionally load external reference metadata fromKettleXMLException
- When an unexpected XML error occurred. (malformed etc.)public Object clone()
StepMetaInterface
clone
in interface StepMetaInterface
clone
in class BaseFileInputMeta<BaseFileInputAdditionalField,BaseFileInputFiles,BaseFileField>
public void allocate(int nrfiles, int nrfields, int nrfilters)
public void allocateFiles(int nrFiles)
public void setDefault()
StepMetaInterface
setDefault
in interface StepMetaInterface
public void getFields(RowMetaInterface row, String name, RowMetaInterface[] info, StepMeta nextStep, VariableSpace space, Repository repository, org.pentaho.metastore.api.IMetaStore metaStore) throws KettleStepException
BaseStepMeta
getFields
in interface StepMetaInterface
getFields
in class BaseStepMeta
row
- the input row meta that is modified in this method to reflect the output row metadata of the stepname
- Name of the step to use as input for the origin field in the valuesinfo
- Fields used as extra lookup informationnextStep
- the next step that is targetedspace
- the space The variable space to use to replace variablesrepository
- the repository to use to load Kettle metadata objects impacting the output fieldsmetaStore
- the MetaStore to use to load additional external data or metadata impacting the output fieldsKettleStepException
- the kettle step exception@Deprecated public void getFields(RowMetaInterface inputRowMeta, String name, RowMetaInterface[] info, StepMeta nextStep, VariableSpace space) throws KettleStepException
BaseStepMeta
getFields
in interface StepMetaInterface
getFields
in class BaseStepMeta
inputRowMeta
- the input row meta that is modified in this method to reflect the output row metadata of the stepname
- Name of the step to use as input for the origin field in the valuesinfo
- Fields used as extra lookup informationnextStep
- the next step that is targetedspace
- the space The variable space to use to replace variablesKettleStepException
- the kettle step exceptionpublic String getXML()
BaseStepMeta
getXML
in interface StepMetaInterface
getXML
in class BaseStepMeta
public String getLookupStepname()
public void searchInfoAndTargetSteps(List<StepMeta> steps)
BaseStepMeta
searchInfoAndTargetSteps
in interface StepMetaInterface
searchInfoAndTargetSteps
in class BaseStepMeta
steps
- optionally search the info step in a list of stepspublic String[] getInfoSteps()
public void readRep(Repository rep, org.pentaho.metastore.api.IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases) throws KettleException
StepMetaInterface
readRep
in interface StepMetaInterface
readRep
in class BaseStepMeta
rep
- The repository to read frommetaStore
- The MetaStore to read external information fromid_step
- The step IDdatabases
- The databases to referenceKettleException
- When an unexpected error occurred (database, network, etc)public void saveRep(Repository rep, org.pentaho.metastore.api.IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step) throws KettleException
StepMetaInterface
saveRep
in interface StepMetaInterface
saveRep
in class BaseStepMeta
rep
- The Kettle repository to save tometaStore
- the metaStore to optionally write toid_transformation
- The transformation IDid_step
- The step IDKettleException
- When an unexpected error occurred (database, network, etc)public void check(List<CheckResultInterface> remarks, TransMeta transMeta, StepMeta stepMeta, RowMetaInterface prev, String[] input, String[] output, RowMetaInterface info, VariableSpace space, Repository repository, org.pentaho.metastore.api.IMetaStore metaStore)
StepMetaInterface
check
in interface StepMetaInterface
check
in class BaseStepMeta
remarks
- The list to put the remarks in @see org.pentaho.di.core.CheckResultstepMeta
- The stepMeta to help checkingprev
- The fields coming from the previous stepinput
- The input step namesoutput
- The output step namesinfo
- The fields that are used as information by the stepspace
- the variable space to resolve variable expressions withrepository
- the repository to use to load Kettle metadata objects impacting the output fieldsmetaStore
- the MetaStore to use to load additional external data or metadata impacting the output fieldspublic StepInterface getStep(StepMeta stepMeta, StepDataInterface stepDataInterface, int cnr, TransMeta transMeta, Trans trans)
StepMetaInterface
getStep
in interface StepMetaInterface
stepMeta
- The step infostepDataInterface
- the step data interface linked to this step. Here the step can store temporary data, database connections,
etc.cnr
- The copy nr to gettransMeta
- The transformation infotrans
- The launching transformationpublic StepDataInterface getStepData()
StepMetaInterface
getStepData
in interface StepMetaInterface
public String getErrorCountField()
public void setErrorCountField(String errorCountField)
public String getErrorFieldsField()
public void setErrorFieldsField(String errorFieldsField)
public String getErrorTextField()
public void setErrorTextField(String errorTextField)
public boolean isErrorLineSkipped()
public void setErrorLineSkipped(boolean errorLineSkipped)
public void setAcceptingStep(StepMeta acceptingStep)
acceptingStep
- The acceptingStep to set.public int getFileFormatTypeNr()
public int getFileTypeNr()
public String exportResources(VariableSpace space, Map<String,ResourceDefinition> definitions, ResourceNamingInterface resourceNamingInterface, Repository repository, org.pentaho.metastore.api.IMetaStore metaStore) throws KettleException
exportResources
in interface StepMetaInterface
exportResources
in class BaseStepMeta
space
- the variable space to usedefinitions
- resourceNamingInterface
- repository
- The repository to optionally load other resources from (to be converted to XML)metaStore
- the metaStore in which non-kettle metadata could reside.KettleException
public boolean supportsErrorHandling()
supportsErrorHandling
in interface StepMetaInterface
supportsErrorHandling
in class BaseStepMeta
public void setFileNameForTest(String[] fileName)
protected String loadSource(Node filenode, Node filenamenode, int i, org.pentaho.metastore.api.IMetaStore metaStore)
protected void saveSource(StringBuilder retVal, String source)
protected String loadSourceRep(Repository rep, ObjectId id_step, int i, org.pentaho.metastore.api.IMetaStore metaStore) throws KettleException
KettleException
protected void saveSourceRep(Repository rep, ObjectId id_transformation, ObjectId id_step, int i, String fileName) throws KettleException
KettleException
public String getEncoding()
getEncoding
in class BaseFileInputMeta<BaseFileInputAdditionalField,BaseFileInputFiles,BaseFileField>
public String getLength()
public void setLength(String length)
length
- the length to setpublic boolean isAcceptingFilenames()
isAcceptingFilenames
in class BaseFileInputMeta<BaseFileInputAdditionalField,BaseFileInputFiles,BaseFileField>
public String getAcceptingStepName()
getAcceptingStepName
in class BaseFileInputMeta<BaseFileInputAdditionalField,BaseFileInputFiles,BaseFileField>
public StepMeta getAcceptingStep()
public String getAcceptingField()
getAcceptingField
in class BaseFileInputMeta<BaseFileInputAdditionalField,BaseFileInputFiles,BaseFileField>
public String[] getFilePaths(VariableSpace space)
public FileInputList getTextFileList(VariableSpace space)
public void resolve()
ResolvableResource
resolve
in interface ResolvableResource
Copyright © 2018 Hitachi Vantara. All rights reserved.