- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
How to use putSQL in nifi
- Labels:
-
Apache NiFi
Created on ‎10-06-2021 11:11 AM - edited ‎10-06-2021 11:12 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi all I am absolute beginner in apache nifi as well as in DWH field, I want to create replica of my database table, using nifi. I am taking Mysql table data using QueryDatabaseTableRecord processor. Now I want this data to be inserted into another mysql database table which I have created. I was trying using the putSQL processor but that didn't worked I got no record inside of my table.
I tried things which I could think of myself, but that was not enough. Please help me !!!
Here is the screenshot of my flow,
Created on ‎10-06-2021 01:44 PM - edited ‎10-06-2021 01:47 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
You seem to be having the correct processors and sequence. Can you share screenshot with the configuration of the put SQL. Have you configured the PUTSQL with the correct DB connection? Also are you seeing data (FlowFiles) flowing into it from the above processors. It could be that you are not getting any data to begin with or your configuration in the putSQL is incorrect. By the way why are you connecting failuer,original, sql relationship from the ConvertJsonTOSQL to the PUT SQL? you will get an error this way, you need to just connect the sql releationship. Another thing , the SQL property in the PUTSQL needs to be empty so that it process the sql received from the convert processor, if you have anything in there it will not take the sql insert from the convert processor
Created ‎10-06-2021 09:52 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi thanks for the reply, I have set the db connection pool, and both are working I believe. I am getting the data from the source database it is available in the queue,
the ss of my process -
MysqlPut configuration -
Where I did this wrong ?
Created ‎10-07-2021 09:32 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think I know what is the problem. Since you are not doing any fragmentation -like in using split processor- try setting the Support Fragmented Transaction to False in the PUTSQL. Also remove the original \ failure connection from the Convert processor. you can mute those relationship in the convert setting table by checking the box.
