nifi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Commented] (NIFI-1280) Create FilterCSVColumns Processor
Date Wed, 11 May 2016 01:24:12 GMT


ASF GitHub Bot commented on NIFI-1280:

Github user zinking commented on a diff in the pull request:
    --- Diff: nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/calcite/adapter/csv/
    @@ -0,0 +1,303 @@
    + * Licensed to the Apache Software Foundation (ASF) under one or more
    + * contributor license agreements.  See the NOTICE file distributed with
    + * this work for additional information regarding copyright ownership.
    + * The ASF licenses this file to you under the Apache License, Version 2.0
    + * (the "License"); you may not use this file except in compliance with
    + * the License.  You may obtain a copy of the License at
    + *
    + *
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +package org.apache.calcite.adapter.csv;
    +import java.text.ParseException;
    +import java.util.ArrayList;
    +import java.util.Date;
    +import java.util.List;
    +import java.util.TimeZone;
    +import org.apache.calcite.linq4j.Enumerator;
    +import org.apache.calcite.rel.type.RelDataType;
    +import org.apache.calcite.util.Pair;
    +import org.apache.commons.lang3.time.FastDateFormat;
    +/** Enumerator that reads from a CSV stream.
    + *
    + * @param <E> Row type
    + */
    +class CsvEnumerator2<E> implements Enumerator<E> {
    --- End diff --
    why CsvEnumerator2, isn't there a better name?

> Create FilterCSVColumns Processor
> ---------------------------------
>                 Key: NIFI-1280
>                 URL:
>             Project: Apache NiFi
>          Issue Type: Task
>          Components: Extensions
>            Reporter: Mark Payne
>            Assignee: Toivo Adams
> We should have a Processor that allows users to easily filter out specific columns from
CSV data. For instance, a user would configure two different properties: "Columns of Interest"
(a comma-separated list of column indexes) and "Filtering Strategy" (Keep Only These Columns,
Remove Only These Columns).
> We can do this today with ReplaceText, but it is far more difficult than it would be
with this Processor, as the user has to use Regular Expressions, etc. with ReplaceText.
> Eventually a Custom UI could even be built that allows a user to upload a Sample CSV
and choose which columns from there, similar to the way that Excel works when importing CSV
by dragging and selecting the desired columns? That would certainly be a larger undertaking
and would not need to be done for an initial implementation.

This message was sent by Atlassian JIRA

View raw message