In order for ReplaceText to reference ${city} and ${count} there need
to be flow file attributes available for these values, and if you
picked up a file from GetFile and went directly to ReplaceText then
they wouldn't be there.

You would likely have to do something like GetFile -> SplitText with
line count 1 -> ExtractText to get city and count in attributes ->
ReplaceText -> PutSQL.

-Bryan


On Tue, May 2, 2017 at 11:58 AM, suman....@cuddle.ai
<suman....@cuddle.ai> wrote:
> Hi ,
> I have a csv file and i want to ingest the csv file data into the database.
>
> I have used getfile,RelaceText,PutSQL Processors.
>
> It's failing in replaceText Processor.
>
> File Sample :
> City,Count
> Mumbai,10
> Mumbai,10
> Pune,10
> Pune,10
>
> ReplaceText :
>
> INSERT INTO CITY(city,count) values ('${city}',${count})
>
> Please help.
>
>
>
> --
> View this message in context: 
> http://apache-nifi-developer-list.39713.n7.nabble.com/Not-able-to-ingest-the-csv-data-to-RDBS-Database-tp15610.html
> Sent from the Apache NiFi Developer List mailing list archive at Nabble.com.

Reply via email to