Package org.pentaho.di.trans.steps.file
Class BaseFileOutputMeta
java.lang.Object
org.pentaho.di.trans.step.BaseStepMeta
org.pentaho.di.trans.steps.file.BaseFileMeta
org.pentaho.di.trans.steps.file.BaseFileOutputMeta
- All Implemented Interfaces:
Cloneable
,StepAttributesInterface
,StepMetaInterface
- Direct Known Subclasses:
TextFileOutputMeta
A base implementation for all output file based metas.
-
Field Summary
Modifier and TypeFieldDescriptionprotected boolean
Flag: add the date in the filenamestatic final String
static final String
protected String
The file extention in case of a generated filenameprotected String
The base name of the output fileprotected boolean
Flag: add the partition number in the filenameprotected boolean
Flag: add the stepnr in the filenameprotected boolean
Flag: add the time in the filenameFields inherited from class org.pentaho.di.trans.steps.file.BaseFileMeta
servletOutput
Fields inherited from class org.pentaho.di.trans.step.BaseStepMeta
attributes, databases, log, loggingObject, parentStepMeta, repository, STEP_ATTRIBUTES_FILE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected String
buildFilename
(String realFileName, String realExtension, String stepnr, String partnr, String splitnr, Date date, boolean ziparchive, boolean showSamples, BaseFileOutputMeta meta) buildFilename
(org.pentaho.di.core.variables.VariableSpace space, String stepnr, String partnr, String splitnr, boolean ziparchive) buildFilename
(org.pentaho.di.core.variables.VariableSpace space, String stepnr, String partnr, String splitnr, boolean ziparchive, boolean showSamples) protected String
buildFilename
(org.pentaho.di.core.variables.VariableSpace space, String realFileName, String realExtension, String stepnr, String partnr, String splitnr, Date date, boolean ziparchive, boolean showSamples, BaseFileOutputMeta meta) String[]
getFilePaths
(boolean showSamples) String[]
getFiles
(org.pentaho.di.core.variables.VariableSpace space) protected String
abstract int
int
getSplitEvery
(org.pentaho.di.core.variables.VariableSpace space) boolean
boolean
boolean
boolean
boolean
boolean
void
setDateTimeFormat
(String dateTimeFormat) void
setExtension
(String extension) void
setFileAsCommand
(boolean fileAsCommand) void
setFileCompression
(String fileCompression) void
setFileName
(String fileName) void
setSpecifyingFormat
(boolean specifyingFormat) abstract void
setSplitEvery
(int splitEvery) Methods inherited from class org.pentaho.di.trans.steps.file.BaseFileMeta
passDataToServletOutput, writesToFile
Methods inherited from class org.pentaho.di.trans.step.BaseStepMeta
analyseImpact, analyseImpact, cancelQueries, check, check, check, clone, createEntry, excludeFromCopyDistributeVerification, excludeFromRowLayoutVerification, exportResources, exportResources, extractStepMetadataEntries, findAttribute, findParent, findParentEntry, getActiveReferencedObjectDescription, getDescription, getDialogClassName, getFields, getFields, 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, getXML, getXmlCode, handleStreamSelection, hasChanged, hasRepositoryReferences, isBasic, isDebug, isDetailed, isReferencedObjectEnabled, isRowLevel, loadReferencedObject, loadReferencedObject, loadStepAttributes, loadXML, loadXML, loadXML, logBasic, logBasic, logDebug, logDebug, logDetailed, logDetailed, logError, logError, logError, logMinimal, logMinimal, logRowlevel, logRowlevel, lookupRepositoryReferences, readRep, readRep, readRep, resetStepIoMeta, saveRep, saveRep, searchInfoAndTargetSteps, setChanged, setChanged, setParentStepMeta, setStepIOMeta, supportsErrorHandling
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.pentaho.di.trans.step.StepMetaInterface
analyseImpact, analyseImpact, cancelQueries, check, check, cleanAfterHopFromRemove, cleanAfterHopFromRemove, cleanAfterHopToRemove, clone, excludeFromCopyDistributeVerification, excludeFromRowLayoutVerification, exportResources, exportResources, extractStepMetadataEntries, fetchTransMeta, getActiveReferencedObjectDescription, getDialogClassName, getFields, getFields, getOptionalStreams, getParentStepMeta, getReferencedObjectDescriptions, getRequiredFields, getResourceDependencies, getSQLStatements, getSQLStatements, getStep, getStepData, getStepIOMeta, getStepMetaInjectionInterface, getSupportedTransformationTypes, getTableFields, getUsedArguments, getUsedDatabaseConnections, getUsedLibraries, getXML, handleStreamSelection, hasChanged, hasRepositoryReferences, isReferencedObjectEnabled, loadReferencedObject, loadXML, loadXML, lookupRepositoryReferences, readRep, readRep, resetStepIoMeta, saveRep, saveRep, searchInfoAndTargetSteps, setChanged, setDefault, setParentStepMeta, supportsErrorHandling
-
Field Details
-
DEFAULT_DATE_FORMAT
- See Also:
-
DEFAULT_TIME_FORMAT
- See Also:
-
stepNrInFilename
protected boolean stepNrInFilenameFlag: add the stepnr in the filename -
partNrInFilename
protected boolean partNrInFilenameFlag: add the partition number in the filename -
dateInFilename
protected boolean dateInFilenameFlag: add the date in the filename -
timeInFilename
protected boolean timeInFilenameFlag: add the time in the filename -
extension
The file extention in case of a generated filename -
fileName
The base name of the output file
-
-
Constructor Details
-
BaseFileOutputMeta
public BaseFileOutputMeta()
-
-
Method Details
-
getExtension
-
setExtension
-
getFileName
-
setFileName
-
getSplitEvery
public abstract int getSplitEvery() -
getSplitEvery
public int getSplitEvery(org.pentaho.di.core.variables.VariableSpace space) -
setSplitEvery
public abstract void setSplitEvery(int splitEvery) -
isFileAsCommand
public boolean isFileAsCommand() -
setFileAsCommand
public void setFileAsCommand(boolean fileAsCommand) -
isSpecifyingFormat
public boolean isSpecifyingFormat() -
setSpecifyingFormat
public void setSpecifyingFormat(boolean specifyingFormat) -
getDateTimeFormat
-
setDateTimeFormat
-
isTimeInFilename
public boolean isTimeInFilename() -
isDateInFilename
public boolean isDateInFilename() -
isPartNrInFilename
public boolean isPartNrInFilename() -
isStepNrInFilename
public boolean isStepNrInFilename() -
getFileCompression
-
setFileCompression
-
getFiles
-
getPartPrefix
-
buildFilename
-
buildFilename
-
buildFilename
-
buildFilename
-
getFilePaths
- Specified by:
getFilePaths
in classBaseFileMeta
- Parameters:
showSamples
- determines whether the paths being returned are dummy samples or the "template" representation. The samples woulc include things like sample step number, partition number etc ( filename_0_1.txt) , while the non-sample path would include a token ( filename_<step>_<partition>.<extension>)- Returns:
- An array of file paths
-