Support Questions

Find answers, ask questions, and share your expertise

how to connect postgresql with nifi?

avatar
Rising Star

i using

hdp 2.5,

Apache NiFi - Version HDF-2.0.0.0-579

5 REPLIES 5

avatar

@Narasimma varman

Use the PutSQL and ExecuteSQL processors. You can read more about them and their usage at the below link.

https://nifi.apache.org/docs.html

You can configure them as below:

15738-13448-putsql.jpg

Also, to get a better idea of how to chain the processors, take a look at the below article for an example flow that ingests data into a relational database using Nifi.

https://www.batchiq.com/database-ingest-with-nifi.html

As always, if you find this post helpful, don't forget to "accept" answer

avatar

@Narasimma varman

Please share a snapshot of the ExecuteQuery processor "properties" tab and the SQL query you are running.

avatar
Explorer

Hello, I am begineer on this topic. I want to connect my dataflow to store data in postgresql and google found your topic in the forum. I am trying all the things you said and the service remains "Enabling". Could you explain exactly the steps to enable this communication. From my side:

1. Download postgresql-42.2.8.jar.

2. Move to C:\Program Files\nifi-1.9.2\lib

3. Restart Nifi.

4. Configure DBCPConnectionPool with the following parameters:

URL: jdbc:postgresql://127.0.0.1:5432/nifi

Diver Class: org/postgresql/Driver.class

Driver Location: file:////C:/Program Files/nifi-1.9.2/lib/postgresql-42.2.8.jar

 

Is something wrong? Could you help me? The service remains "ENABLING"

 

Regards,

avatar
Rising Star

I follow all steps that are mentioned in link but i got table not found error

15795-screenshot-from-2017-05-26-120559.png

avatar
New Contributor

HI Narasimma varman ,

Above error comes when you have created schema and did not configured it in Database pool controller service ,can you please provide my snap shot of configuration.