Class CSVFileStoreConnector

    • Constructor Detail

      • CSVFileStoreConnector

        public CSVFileStoreConnector()
    • Method Detail

      • initialize

        public void initialize​(String connectorInstanceId,
                               ConnectionProperties connectionProperties)
        Initialize the connector.
        Overrides:
        initialize in class BasicFileStoreConnector
        Parameters:
        connectorInstanceId - - unique id for the connector instance - useful for messages etc
        connectionProperties - - POJO for the configuration used to create the connector.
      • getColumnNames

        public List<String> getColumnNames()
                                    throws FileException,
                                           FileReadException
        Return the list of column names associated with this structured file. This may be embedded in the first line of the file or encoded in the connection object used to create a connector instance.
        Specified by:
        getColumnNames in interface CSVFileStore
        Returns:
        a list of column names
        Throws:
        FileException - problem accessing the file
        FileReadException - unable to retrieve the column names
      • readRecord

        public List<String> readRecord​(int dataRecordNumber)
                                throws FileException,
                                       FileReadException
        Return the requested data record. The first record is record 0. If the first line of the file is the column names then record 0 is the line following the column names.
        Specified by:
        readRecord in interface CSVFileStore
        Parameters:
        dataRecordNumber - long
        Returns:
        List of strings, each string is the value from the column.
        Throws:
        FileException - problem accessing the file
        FileReadException - unable to find, open or read the file, or the file does not include the requested record.