public class TextFileOutputMeta extends BaseFileOutputMeta implements StepMetaInterface, ResolvableResource
| Modifier and Type | Field and Description |
|---|---|
protected static int |
FILE_COMPRESSION_TYPE_NONE |
protected static int |
FILE_COMPRESSION_TYPE_ZIP |
protected static String[] |
fileCompressionTypeCodes |
static String[] |
formatMapperLineTerminator |
dateInFilename, extension, fileName, partNrInFilename, stepNrInFilename, timeInFilenameattributes, databases, log, loggingObject, parentStepMeta, repository, STEP_ATTRIBUTES_FILE| Constructor and Description |
|---|
TextFileOutputMeta() |
| Modifier and Type | Method and Description |
|---|---|
void |
allocate(int nrfields) |
String |
buildFilename(String filename,
String extension,
VariableSpace space,
int stepnr,
String partnr,
int splitnr,
boolean ziparchive,
TextFileOutputMeta meta) |
String |
buildFilename(VariableSpace space,
int stepnr,
String partnr,
int splitnr,
boolean ziparchive) |
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.
|
List<StepInjectionMetaEntry> |
extractStepMetadataEntries() |
String |
getEnclosure() |
String |
getEncoding() |
String |
getEndedLine() |
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.
|
String |
getFileFormat() |
String |
getFileNameField() |
int |
getFooterShift() |
String |
getNewline() |
String |
getNewLine(String fformat) |
TextFileField[] |
getOutputFields() |
String |
getSeparator() |
int |
getSplitEvery()
Deprecated.
|
int |
getSplitEvery(VariableSpace varSpace) |
String |
getSplitEveryRows() |
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.
|
String |
getXML()
Produces the XML string that describes this step's information.
|
boolean |
isAddToResultFiles() |
boolean |
isCreateParentFolder() |
boolean |
isDoNotOpenNewFileInit() |
boolean |
isEnclosureFixDisabled() |
boolean |
isEnclosureForced() |
boolean |
isFastDump() |
boolean |
isFileAppended() |
boolean |
isFileNameInField() |
boolean |
isFooterEnabled() |
boolean |
isHeaderEnabled() |
boolean |
isPadded() |
boolean |
isServletOutput() |
protected String |
loadSource(Node stepnode,
org.pentaho.metastore.api.IMetaStore metastore) |
protected String |
loadSourceRep(Repository rep,
ObjectId id_step,
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
|
boolean |
passDataToServletOutput()
True if the step passes it's result data straight to the servlet output.
|
void |
readData(Node stepnode) |
protected void |
readData(Node stepnode,
org.pentaho.metastore.api.IMetaStore metastore) |
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.
|
protected void |
saveFileOptions(StringBuilder retval) |
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 value) |
protected void |
saveSourceRep(Repository rep,
ObjectId id_transformation,
ObjectId id_step,
String value) |
void |
setAddToResultFiles(boolean addtoresultfilenamesin) |
void |
setCreateParentFolder(boolean createparentfolder) |
void |
setDateInFilename(boolean dateInFilename) |
void |
setDefault()
Set default values
|
void |
setDoNotOpenNewFileInit(boolean doNotOpenNewFileInit) |
void |
setEnclosure(String enclosure) |
void |
setEnclosureFixDisabled(boolean disableEnclosureFix) |
void |
setEnclosureForced(boolean enclosureForced) |
void |
setEncoding(String encoding) |
void |
setEndedLine(String endedLine) |
void |
setFastDump(boolean fastDump) |
void |
setFileAppended(boolean fileAppended) |
void |
setFileFormat(String fileFormat) |
void |
setFilename(String fileName) |
void |
setFileNameField(String fileNameField) |
void |
setFileNameInField(boolean fileNameInField) |
void |
setFooterEnabled(boolean footer) |
void |
setHeaderEnabled(boolean header) |
void |
setNewline(String newline) |
void |
setOutputFields(TextFileField[] outputFields) |
void |
setPadded(boolean padded) |
void |
setPartNrInFilename(boolean partNrInFilename) |
void |
setSeparator(String separator) |
void |
setServletOutput(boolean servletOutput) |
void |
setSplitEvery(int splitEvery)
Deprecated.
|
void |
setSplitEveryRows(String value) |
void |
setStepNrInFilename(boolean stepNrInFilename) |
void |
setTimeInFilename(boolean timeInFilename) |
buildFilename, buildFilename, buildFilename, buildFilename, getDateTimeFormat, getExtension, getFileCompression, getFileName, getFilePaths, getFiles, getPartPrefix, isDateInFilename, isFileAsCommand, isPartNrInFilename, isSpecifyingFormat, isStepNrInFilename, isTimeInFilename, setDateTimeFormat, setExtension, setFileAsCommand, setFileCompression, setFileName, setSpecifyingFormatwritesToFileanalyseImpact, analyseImpact, cancelQueries, check, check, createEntry, excludeFromCopyDistributeVerification, excludeFromRowLayoutVerification, exportResources, findAttribute, findParent, findParentEntry, getActiveReferencedObjectDescription, getDescription, getDialogClassName, getLog, getLogChannelId, getName, getObjectCopy, getObjectId, getObjectRevision, getObjectType, getOptionalStreams, getParent, getParentStepMeta, getReferencedObjectDescriptions, getRepCode, getRepositoryDirectory, getRequiredFields, getRequiredFields, getResourceDependencies, getSQLStatements, getSQLStatements, getStepInjectionMetadataEntries, getStepIOMeta, 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, searchInfoAndTargetSteps, setChanged, setChanged, setParentStepMeta, setStepIOMeta, supportsErrorHandlingequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitanalyseImpact, analyseImpact, cancelQueries, check, cleanAfterHopFromRemove, cleanAfterHopFromRemove, cleanAfterHopToRemove, excludeFromCopyDistributeVerification, excludeFromRowLayoutVerification, exportResources, fetchTransMeta, getActiveReferencedObjectDescription, getDialogClassName, getOptionalStreams, getParentStepMeta, getReferencedObjectDescriptions, getRequiredFields, getResourceDependencies, getSQLStatements, getSQLStatements, getStepIOMeta, getStepMetaInjectionInterface, getSupportedTransformationTypes, getTableFields, getUsedArguments, getUsedDatabaseConnections, getUsedLibraries, handleStreamSelection, hasChanged, hasRepositoryReferences, isReferencedObjectEnabled, loadReferencedObject, loadXML, lookupRepositoryReferences, readRep, resetStepIoMeta, saveRep, searchInfoAndTargetSteps, setChanged, setParentStepMeta, supportsErrorHandlingprotected static final int FILE_COMPRESSION_TYPE_NONE
protected static final int FILE_COMPRESSION_TYPE_ZIP
protected static final String[] fileCompressionTypeCodes
public static final String[] formatMapperLineTerminator
public boolean isServletOutput()
public void setServletOutput(boolean servletOutput)
public void setCreateParentFolder(boolean createparentfolder)
createparentfolder - The createparentfolder to set.public boolean isCreateParentFolder()
public void setDateInFilename(boolean dateInFilename)
dateInFilename - The dateInFilename to set.public String getEnclosure()
public void setEnclosure(String enclosure)
enclosure - The enclosure to set.public boolean isEnclosureForced()
public void setEnclosureForced(boolean enclosureForced)
enclosureForced - The enclosureForced to set.public boolean isEnclosureFixDisabled()
public void setEnclosureFixDisabled(boolean disableEnclosureFix)
disableEnclosureFix - The enclosureFixDisabled to set.public boolean isAddToResultFiles()
public void setAddToResultFiles(boolean addtoresultfilenamesin)
addtoresultfilenamesin - The addtoresultfilenames to set.public boolean isFileAppended()
public void setFileAppended(boolean fileAppended)
fileAppended - The fileAppended to set.public String getFileFormat()
public void setFileFormat(String fileFormat)
fileFormat - The fileFormat to set.public boolean isFooterEnabled()
public void setFooterEnabled(boolean footer)
footer - The footer to set.public boolean isHeaderEnabled()
public void setHeaderEnabled(boolean header)
header - The header to set.public String getNewline()
public void setNewline(String newline)
newline - The newline to set.public boolean isPadded()
public void setPadded(boolean padded)
padded - The padded to set.public boolean isFastDump()
public void setFastDump(boolean fastDump)
fastDump - The fastDump to set.public String getSeparator()
public void setSeparator(String separator)
separator - The separator to set.public boolean isDoNotOpenNewFileInit()
public void setDoNotOpenNewFileInit(boolean doNotOpenNewFileInit)
doNotOpenNewFileInit - The "do not open new file at init" flag to set.public int getSplitEvery()
getSplitEvery(VariableSpace) or getSplitEveryRows()getSplitEvery in class BaseFileOutputMetapublic int getSplitEvery(VariableSpace varSpace)
getSplitEvery in class BaseFileOutputMetavarSpace - for variable substitutionpublic String getSplitEveryRows()
public void setSplitEveryRows(String value)
value - At how many rows to split into a new file.public int getFooterShift()
public void setSplitEvery(int splitEvery)
setSplitEveryRows(String)setSplitEvery in class BaseFileOutputMetasplitEvery - The splitEvery to set.public void setStepNrInFilename(boolean stepNrInFilename)
stepNrInFilename - The stepNrInFilename to set.public void setPartNrInFilename(boolean partNrInFilename)
partNrInFilename - The partNrInFilename to set.public void setTimeInFilename(boolean timeInFilename)
timeInFilename - The timeInFilename to set.public TextFileField[] getOutputFields()
public void setOutputFields(TextFileField[] outputFields)
outputFields - The outputFields to set.public String getEncoding()
public void setEncoding(String encoding)
encoding - The desired encoding of output file, null or empty if the default system encoding needs to be used.public String getEndedLine()
public void setEndedLine(String endedLine)
endedLine - The desired last line in the output file, null or empty if nothing has to be added.public boolean isFileNameInField()
public void setFileNameInField(boolean fileNameInField)
fileNameInField - Is the file name coded in a field?public String getFileNameField()
public void setFileNameField(String fileNameField)
fileNameField - Name of the field that contains the file namepublic void loadXML(Node stepnode, List<DatabaseMeta> databases, org.pentaho.metastore.api.IMetaStore metaStore) throws KettleXMLException
StepMetaInterfaceloadXML in interface StepMetaInterfaceloadXML in class BaseStepMetastepnode - 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 void allocate(int nrfields)
public Object clone()
StepMetaInterfaceclone in interface StepMetaInterfaceclone in class BaseStepMetaprotected void readData(Node stepnode, org.pentaho.metastore.api.IMetaStore metastore) throws KettleXMLException
KettleXMLExceptionpublic void readData(Node stepnode) throws KettleXMLException
KettleXMLExceptionpublic void setDefault()
StepMetaInterfacesetDefault in interface StepMetaInterfacepublic String buildFilename(VariableSpace space, int stepnr, String partnr, int splitnr, boolean ziparchive)
public String buildFilename(String filename, String extension, VariableSpace space, int stepnr, String partnr, int splitnr, boolean ziparchive, TextFileOutputMeta meta)
public void getFields(RowMetaInterface row, String name, RowMetaInterface[] info, StepMeta nextStep, VariableSpace space, Repository repository, org.pentaho.metastore.api.IMetaStore metaStore) throws KettleStepException
BaseStepMetagetFields in interface StepMetaInterfacegetFields in class BaseStepMetarow - 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
BaseStepMetagetFields in interface StepMetaInterfacegetFields in class BaseStepMetainputRowMeta - 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()
BaseStepMetagetXML in interface StepMetaInterfacegetXML in class BaseStepMetaprotected void saveFileOptions(StringBuilder retval)
public void readRep(Repository rep, org.pentaho.metastore.api.IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases) throws KettleException
StepMetaInterfacereadRep in interface StepMetaInterfacereadRep in class BaseStepMetarep - 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
StepMetaInterfacesaveRep in interface StepMetaInterfacesaveRep in class BaseStepMetarep - 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)
StepMetaInterfacecheck in interface StepMetaInterfacecheck in class BaseStepMetaremarks - 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)
StepMetaInterfacegetStep in interface StepMetaInterfacestepMeta - 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()
StepMetaInterfacegetStepData in interface StepMetaInterfacepublic String exportResources(VariableSpace space, Map<String,ResourceDefinition> definitions, ResourceNamingInterface resourceNamingInterface, Repository repository, org.pentaho.metastore.api.IMetaStore metaStore) throws KettleException
exportResources in interface StepMetaInterfaceexportResources in class BaseStepMetaspace - 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.KettleExceptionpublic void setFilename(String fileName)
public List<StepInjectionMetaEntry> extractStepMetadataEntries() throws KettleException
extractStepMetadataEntries in interface StepMetaInterfaceextractStepMetadataEntries in class BaseStepMetaKettleExceptionprotected String loadSource(Node stepnode, org.pentaho.metastore.api.IMetaStore metastore)
protected void saveSource(StringBuilder retVal, String value)
protected String loadSourceRep(Repository rep, ObjectId id_step, org.pentaho.metastore.api.IMetaStore metaStore) throws KettleException
KettleExceptionprotected void saveSourceRep(Repository rep, ObjectId id_transformation, ObjectId id_step, String value) throws KettleException
KettleExceptionpublic boolean passDataToServletOutput()
passDataToServletOutput in interface StepMetaInterfacepassDataToServletOutput in class BaseFileMetapublic void resolve()
ResolvableResourceresolve in interface ResolvableResourceCopyright © 2018 Hitachi Vantara. All rights reserved.