Search in sources :

Example 6 with FileInputDelimited

use of org.talend.fileprocess.FileInputDelimited in project components by Talend.

the class FileInputDelimitedRuntime method getFileDelimited.

public FileInputDelimited getFileDelimited() throws IOException {
    FileInputDelimited fileInputDelimited = null;
    if (uncompress) {
        ZipEntry zipEntry = null;
        if (hashNextEntry()) {
            fileInputDelimited = new FileInputDelimited(zipInputStream, encoding, props.fieldSeparator.getValue(), props.rowSeparator.getValue(), props.removeEmptyRow.getValue(), header, footer, limit, nbRandom, splitRecord);
        }
    } else {
        if (sourceIsStream) {
            checkFooterAndRandom();
            fileInputDelimited = new FileInputDelimited((InputStream) fileNameOrStream, encoding, props.fieldSeparator.getValue(), props.rowSeparator.getValue(), props.removeEmptyRow.getValue(), header, footer, limit, nbRandom, splitRecord);
        } else {
            fileInputDelimited = new FileInputDelimited(String.valueOf(fileNameOrStream), encoding, props.fieldSeparator.getValue(), props.rowSeparator.getValue(), props.removeEmptyRow.getValue(), header, footer, limit, nbRandom, splitRecord);
        }
    }
    return fileInputDelimited;
}
Also used : FileInputDelimited(org.talend.fileprocess.FileInputDelimited) ZipInputStream(java.util.zip.ZipInputStream) InputStream(java.io.InputStream) ZipEntry(java.util.zip.ZipEntry)

Aggregations

FileInputDelimited (org.talend.fileprocess.FileInputDelimited)6 IOException (java.io.IOException)3 CSVReader (com.talend.csv.CSVReader)2 Gson (com.google.gson.Gson)1 File (java.io.File)1 InputStream (java.io.InputStream)1 SQLException (java.sql.SQLException)1 ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1 HashSet (java.util.HashSet)1 ZipEntry (java.util.zip.ZipEntry)1 ZipInputStream (java.util.zip.ZipInputStream)1 IPath (org.eclipse.core.runtime.IPath)1 Path (org.eclipse.core.runtime.Path)1 DelimitedFileConnection (org.talend.core.model.metadata.builder.connection.DelimitedFileConnection)1 AnalyzedDataSet (org.talend.dataquality.analysis.AnalyzedDataSet)1 DistinctCountIndicator (org.talend.dataquality.indicators.DistinctCountIndicator)1 DuplicateCountIndicator (org.talend.dataquality.indicators.DuplicateCountIndicator)1 Indicator (org.talend.dataquality.indicators.Indicator)1 RowCountIndicator (org.talend.dataquality.indicators.RowCountIndicator)1