Class TextFileOutput

java.lang.Object
org.pentaho.di.trans.step.BaseStep
org.pentaho.di.trans.steps.textfileoutput.TextFileOutput
All Implemented Interfaces:
org.pentaho.di.core.ExtensionDataInterface, HasLogChannelInterface, org.pentaho.di.core.logging.LoggingObjectInterface, org.pentaho.di.core.logging.LoggingObjectLifecycleInterface, org.pentaho.di.core.variables.VariableSpace, StepInterface
Direct Known Subclasses:
TextFileOutputLegacy

public class TextFileOutput extends BaseStep implements StepInterface
Converts input rows to text and then writes this text to one or more files.
Since:
4-apr-2003
Author:
Matt
  • Field Details

  • Constructor Details

  • Method Details

    • isFileExists

      public boolean isFileExists(String filename) throws org.pentaho.di.core.exception.KettleException
      Throws:
      org.pentaho.di.core.exception.KettleException
    • initFileStreamWriter

      public void initFileStreamWriter(String filename) throws org.pentaho.di.core.exception.KettleException
      Throws:
      org.pentaho.di.core.exception.KettleException
    • getOutputFileName

      public String getOutputFileName(Object[] row) throws org.pentaho.di.core.exception.KettleException
      Throws:
      org.pentaho.di.core.exception.KettleException
    • getFlushInterval

      public int getFlushInterval()
    • getMaxOpenFiles

      public int getMaxOpenFiles()
    • isWriteHeader

      public boolean isWriteHeader(String filename) throws org.pentaho.di.core.exception.KettleException
      Throws:
      org.pentaho.di.core.exception.KettleException
    • flushOpenFiles

      public void flushOpenFiles(boolean closeAfterFlush) throws IOException
      Throws:
      IOException
    • processRow

      public boolean processRow(StepMetaInterface smi, StepDataInterface sdi) throws org.pentaho.di.core.exception.KettleException
      Description copied from interface: StepInterface
      Perform the equivalent of processing one row. Typically this means reading a row from input (getRow()) and passing a row to output (putRow)).
      Specified by:
      processRow in interface StepInterface
      Overrides:
      processRow in class BaseStep
      Parameters:
      smi - The steps metadata to work with
      sdi - The steps temporary working data to work with (database connections, result sets, caches, temporary variables, etc.)
      Returns:
      false if no more rows can be processed or an error occurred.
      Throws:
      org.pentaho.di.core.exception.KettleException
    • writeRowTo

      protected boolean writeRowTo(Object[] row) throws org.pentaho.di.core.exception.KettleException
      Throws:
      org.pentaho.di.core.exception.KettleException
    • writeRow

      public void writeRow(org.pentaho.di.core.row.RowMetaInterface rowMeta, Object[] r) throws org.pentaho.di.core.exception.KettleStepException
      Throws:
      org.pentaho.di.core.exception.KettleStepException
    • writeEndedLine

      protected boolean writeEndedLine()
    • writeHeader

      protected boolean writeHeader()
    • buildFilename

      public String buildFilename(String filename, boolean ziparchive)
    • closeFile

      protected boolean closeFile(String filename)
    • closeFile

      protected boolean closeFile()
    • init

      public boolean init(StepMetaInterface smi, StepDataInterface sdi)
      Description copied from interface: StepInterface
      Initialize and do work where other steps need to wait for...
      Specified by:
      init in interface StepInterface
      Overrides:
      init in class BaseStep
      Parameters:
      smi - The metadata to work with
      sdi - The data to initialize
    • initOutput

      protected void initOutput() throws org.pentaho.di.core.exception.KettleException
      Throws:
      org.pentaho.di.core.exception.KettleException
    • initBinaryDataFields

      protected void initBinaryDataFields() throws org.pentaho.di.core.exception.KettleException
      Throws:
      org.pentaho.di.core.exception.KettleException
    • close

      protected void close() throws IOException
      Throws:
      IOException
    • dispose

      public void dispose(StepMetaInterface smi, StepDataInterface sdi)
      Description copied from interface: StepInterface
      Dispose of this step: close files, empty logs, etc.
      Specified by:
      dispose in interface StepInterface
      Overrides:
      dispose in class BaseStep
      Parameters:
      smi - The metadata to work with
      sdi - The data to dispose of
    • containsSeparatorOrEnclosure

      public boolean containsSeparatorOrEnclosure(byte[] source, byte[] separator, byte[] enclosure)
    • getFileObject

      protected org.apache.commons.vfs2.FileObject getFileObject(String vfsFilename) throws org.pentaho.di.core.exception.KettleFileException
      Throws:
      org.pentaho.di.core.exception.KettleFileException
    • getFileObject

      protected org.apache.commons.vfs2.FileObject getFileObject(String vfsFilename, org.pentaho.di.core.variables.VariableSpace space) throws org.pentaho.di.core.exception.KettleFileException
      Throws:
      org.pentaho.di.core.exception.KettleFileException
    • getOutputStream

      protected OutputStream getOutputStream(String vfsFilename, org.pentaho.di.core.variables.VariableSpace space, boolean append) throws org.pentaho.di.core.exception.KettleFileException
      Throws:
      org.pentaho.di.core.exception.KettleFileException