Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 0DAA4200C8F for ; Fri, 9 Jun 2017 11:02:42 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 07A72160BC8; Fri, 9 Jun 2017 09:02:42 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 27916160B9C for ; Fri, 9 Jun 2017 11:02:41 +0200 (CEST) Received: (qmail 57008 invoked by uid 500); 9 Jun 2017 09:02:40 -0000 Mailing-List: contact users-help@nifi.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@nifi.apache.org Delivered-To: mailing list users@nifi.apache.org Received: (qmail 56979 invoked by uid 99); 9 Jun 2017 09:02:39 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Jun 2017 09:02:39 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 917CE181A72 for ; Fri, 9 Jun 2017 09:02:38 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.629 X-Spam-Level: ** X-Spam-Status: No, score=2.629 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id mBUvfqh5nA2O for ; Fri, 9 Jun 2017 09:02:35 +0000 (UTC) Received: from mail-ua0-f177.google.com (mail-ua0-f177.google.com [209.85.217.177]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id C98465F5C4 for ; Fri, 9 Jun 2017 09:02:34 +0000 (UTC) Received: by mail-ua0-f177.google.com with SMTP id h39so30531724uaa.3 for ; Fri, 09 Jun 2017 02:02:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=2k6ZjlJmba/2MDMzS3TdU8zFbWi6VXd6jjeRc0e1A6U=; b=BWkT0GopvOJ8Nwq8LZvGjUmEE6rqqFxbJ/stECGwsiRsMN6IQY5vWoOnNX7DimTYul juxXjklDFMXbjjUuwZCM/U4IcyQx/urtbvyISEs/39nj43HcpRHpmYsuLJhl2VdaVkdA I8Aj/oZmuTZchy+maWrVlHOeMrWu5TURxBG2sOvVOsD32W2U94tbUOAp3TtiXtc/cRIC XaZD6/6K/5KZY6k0zQHDQKXDr4jMdCVPkobZJbq+s0VbjWFe+LLQKAD+AS7pU3ZPlsRf dDHAF332MDWFUv0W3Wp5KMFZbfm87CQH7As05nayf/I95jM8DAdPUvk8z3XkVDB81IRz eQfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=2k6ZjlJmba/2MDMzS3TdU8zFbWi6VXd6jjeRc0e1A6U=; b=R+KN31VOtwKYcu1sRakzMXPI+QUDgYLOfZ+9coMF90GpkxdODx5dMJTyBnyKcC2YTF jIQ6faFACSPuyD3mb+ugHCO3V53PMPRVCY8i3XiRdmajLbYD5CK2K0GO72cldEHMLAHz 43b7mq2zLQ8ajCN2TRndAEkQq/bDDl37Ubi/11/CwAYjXx6nNwZoqHrOWFOMktUepMfZ i/xIfZaHc6D+Mz0ASEFz+laaabRAsJdJfOYV3uBkgac4dWXuQt4uK0ejeA4AqMkYvRIb 5z7YsXDnNU3DUV7Z2z7WJQOz6DZmyl1X7zDSPkkFwHvVHR6NQWQ0HlE5Vx/v421d3rDo gtJw== X-Gm-Message-State: AODbwcDhZjl3oQ+oQZiVSEpfTzpf4qlGUKHuZBl8WBfyzmbvMn6nZtsv EBFET89xZgjdhKAtontXdAjfeFrcOg== X-Received: by 10.176.70.69 with SMTP id z5mr19571582uab.37.1496998947626; Fri, 09 Jun 2017 02:02:27 -0700 (PDT) MIME-Version: 1.0 Received: by 10.176.83.101 with HTTP; Fri, 9 Jun 2017 02:02:27 -0700 (PDT) In-Reply-To: References: From: prabhu Mahendran Date: Fri, 9 Jun 2017 14:32:27 +0530 Message-ID: Subject: Re: How to count the number of lines in csv? To: users@nifi.apache.org Content-Type: multipart/alternative; boundary="f40304361f0280a5f70551833ae3" archived-at: Fri, 09 Jun 2017 09:02:42 -0000 --f40304361f0280a5f70551833ae3 Content-Type: text/plain; charset="UTF-8" I have found that we can easily calculate lines using SplitText processor. It having "fragment.count" attribute which say number of splits. So no need for create custom processor. Thanks for your mail On Fri, Jun 9, 2017 at 1:14 PM, Venkat Williams wrote: > Write custom processor to with csv parser either using uniocity lib or > open csv lib and do no.of records.. > > I don't aware if there is something along with CSVRecord processor. > > Regards, > Venkat > > On Fri, Jun 9, 2017 at 1:02 PM, prabhu Mahendran > wrote: > >> Hi All, >> >> i try to count the number of lines in csv. >> >> Following Reference, >> https://nifi.apache.org/docs/nifi-docs/html/expression-langu >> age-guide.html#count >> >> with help of below method.I have stored the entire flow file in "input" >> attribute and then delimited by using LineFeed character. >> >> ${allDelineatedValues(${input}, "\n"):count()} >> >> i have used extracttext processor for store entire flowfile into those >> attribute. >> >> I can able to get number of lines in smaller csv files only it cannot >> work for huge files(10 GB files) due to extract text only holds >> 2147463746 <(214)%20746-3746> bytes in Buffer size only.it leads wrong >> number of count stored in attribute. >> >> *Is there is any other way to count number of lines in csv without use >> Script?* >> > > --f40304361f0280a5f70551833ae3 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I have found that we can easily calculate lines using Spli= tText processor.

It having "fragment.count" attribute whic= h say number of splits.

So no need for create custom processor.
<= br>Thanks for your mail

On Fri, Jun 9, 2017 at 1:14 PM, Venkat Williams <venka= t.williams@gmail.com> wrote:
Write custom processor to with csv parser either using u= niocity lib or open csv lib and do no.of records..=C2=A0

I don't aware if there is something along with CSVRecord processor.

Regards,
Venkat

On Fri, Jun 9, 2017 at 1:02 PM, prabhu Mahendran <prabh= uu161994@gmail.com> wrote:
=
Hi All,

i try to count the number of lines in = csv.

Following Reference,
htt= ps://nifi.apache.org/docs/nifi-docs/html/expression-language-guid= e.html#count

with help of below method.I h= ave stored the entire flow file in "input" attribute and then del= imited by using LineFeed character.

${allDelineatedValues(${input}, "\n"):count()}

i have used extracttext processor for store entire flowfile into thos= e attribute.

I can able to get number of lines in smaller csv files = only it cannot work for huge files(10 GB files) due to extract text only ho= lds 2147463746 bytes in Buffer size only.it leads wrong number of count stored in attribute.
Is there is any other way to count number of lines in csv without use = Script?


--f40304361f0280a5f70551833ae3--