Re: Groovy script

2021-02-24 Thread Etienne Jouvin
session.transfer(flowfile, REL_FAILURE) > } else { > session.transfer(flowfile, REL_SUCCESS) > } Could be something like this. Le mer. 24 févr. 2021 à 17:47, Tomislav Novosel < tomislav.novo...@clearpeaks.com> a écrit : > Hi guys, > > > > I want to check i

RE: Groovy script

2021-02-24 Thread Tomislav Novosel
apache.org Subject: Re: Groovy script If file_path is pointing to a folder as you said, it's going to check for the folder's existence. The fact that it's failing to return true there suggests that something is wrong with the path in the file_path attribute. On Wed, Feb 24, 2021 at

Re: Groovy script

2021-02-24 Thread Mike Thomsen
te: > > Hi guys, > > > > I want to check if file exists with this groovy script: > > > > flowfile = session.get() > if(!flowfile) return > > file_path = flowfile.getAttribute('file_path') > File file = new File(file_path) > > if(file.exists()){

Groovy script

2021-02-24 Thread Tomislav Novosel
Hi guys, I want to check if file exists with this groovy script: flowfile = session.get() if(!flowfile) return file_path = flowfile.getAttribute('file_path') File file = new File(file_path) if(file.exists()){ session.transfer(flowfile, REL_FAILURE) } else{ session.transfer(flowfile, R

Re: NIFI Groovy Script - Filter file names and get count

2020-10-30 Thread KhajaAsmath Mohammed
On Thu, Oct 29, 2020 at 5:12 PM KhajaAsmath Mohammed >> wrote: >> >> Hi, >> >> I have a requirement where I need to get the file count from the path using >> the groovy script. >> >> I came up with the below but unable to fil

Re: NIFI Groovy Script - Filter file names and get count

2020-10-30 Thread Mike Thomsen
get the file count from the path using > the groovy script. > > I came up with the below but unable to filter and count only txt files . Any > suggestions please? > > import org.apache.commons.io.IOUtils > import java.nio.charset.*; > import java.io.*; > > def flowF

NIFI Groovy Script - Filter file names and get count

2020-10-29 Thread KhajaAsmath Mohammed
Hi, I have a requirement where I need to get the file count from the path using the groovy script. I came up with the below but unable to filter and count only txt files . Any suggestions please? import org.apache.commons.io.IOUtils import java.nio.charset.*; import java.io.*; def flowFile

Re: groovy script in nifi 1.11 : unable to loasd FastStringService

2020-06-02 Thread Mark Payne
e and scripting languages and such. Having said that, we can maintain this thread until we get to the bottom of the issue. Regards, Matt On Mon, May 11, 2020 at 3:47 AM Chris Herssens mailto:chris.herss...@gmail.com>> wrote: Hello, I try to implement a groovy script where I'm usin

Re: groovy script in nifi 1.11 : unable to loasd FastStringService

2020-05-11 Thread Matt Burgess
; > BTW for scripted component issues, you might be better off emailing > the dev list, there may be more folks in there familiar with the NiFi > code and scripting languages and such. Having said that, we can > maintain this thread until we get to the bottom of the issue. > >

Re: groovy script in nifi 1.11 : unable to loasd FastStringService

2020-05-11 Thread Matt Burgess
2020 at 3:47 AM Chris Herssens wrote: > > Hello, > > I try to implement a groovy script where I'm using jsonOutput. > With nifi 1.5 the script works, but If I'm try to use the same groovy script > with nifi 1.11.4, I get > "unable to load FastStringService&

groovy script in nifi 1.11 : unable to loasd FastStringService

2020-05-11 Thread Chris Herssens
Hello, I try to implement a groovy script where I'm using jsonOutput. With nifi 1.5 the script works, but If I'm try to use the same groovy script with nifi 1.11.4, I get "unable to load FastStringService" example code : class GroovyRecordSetWriter implements RecordSetWri

Re: How to merge two rows data into single row in groovy script/nifi processors?

2017-08-16 Thread Matt Burgess
but some rows to avoid those two line > data into single line like below. > > UID|Name|ID|Mail > 1|Ester|991|sd gmail > 2|Siva|992|siva hotmail > 3|Hari|993|hi gmail > I don't know that nifi processors in which helpful for this conversion. > > But i have tried

How to merge two rows data into single row in groovy script/nifi processors?

2017-08-16 Thread prabhu Mahendran
|Name|ID|Mail 1|Ester|991|sd gmail 2|Siva|992|siva hotmail 3|Hari|993|hi gmail I don't know that nifi processors in which helpful for this conversion. But i have tried following Groovy Script to read lines and not able to find way to combine spitted rows into single row. def flowfile = sessio

Re: Issue with Groovy script

2017-05-05 Thread Mike Harding
esto.apa...@gmail.com > > PGP Fingerprint: 70EC B3E5 98A6 5A3F D3C4 BACE 3C6E F65B 2F7D EF69 > > > > On May 4, 2017, at 1:58 PM, Mike Harding wrote: > > > > Hi all, > > > > I'm trying to run a simple groovy script in ExecuteScript processo

Re: Issue with Groovy script

2017-05-04 Thread Matt Burgess
C6E F65B 2F7D EF69 > > On May 4, 2017, at 1:58 PM, Mike Harding wrote: > > Hi all, > > I'm trying to run a simple groovy script in ExecuteScript processor to make > a HTTP GET request (I understand their are processors get this but I'm just > exploring Groov

Re: Issue with Groovy script

2017-05-04 Thread Andy LoPresto
5A3F D3C4 BACE 3C6E F65B 2F7D EF69 > On May 4, 2017, at 1:58 PM, Mike Harding wrote: > > Hi all, > > I'm trying to run a simple groovy script in ExecuteScript processor to make a > HTTP GET request (I understand their are processors get this but I'm just >

Issue with Groovy script

2017-05-04 Thread Mike Harding
Hi all, I'm trying to run a simple groovy script in ExecuteScript processor to make a HTTP GET request (I understand their are processors get this but I'm just exploring Groovy at the minute). import groovyx.net.http.HTTPBuilder > flowFile = session.get() > def http = new HT