- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Is it possible to create a table in mysql using nifi, the data comes in excel from?
- Labels:
-
Apache NiFi
Created on
‎03-27-2020
12:22 AM
- last edited on
‎03-27-2020
02:47 AM
by
VidyaSargur
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I did nifi and mysql setup in stand alone machine, where I have scenario the input will be in excel form, i need to create table in mysql db.
I have seen processors where we can do UPDATE, INSERT, or DELETE SQL, does create will be possible?
Also Do I need to write custom processor to extract the column names from the excel?
Created on ‎03-27-2020 05:49 AM - edited ‎03-27-2020 05:53 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@murali2425 It sure is possible. I believe anything is possible in NiFi!! The excel processor is: ConvertExcelToCSVProcessor
I have also put an Excel to SQL template on my GitHub:
https://github.com/steven-dfheinz/NiFi-Templates
This template gets an excel file that contains product inventory data (sku, name, price, description, quantity, etc and routes the contents of the excel file to ConvertsExceltoCSV. Then it splits the csv file line by line, parses each line for quantity and sku and uses those attributes to build an insert query, which is finally executed via PutSQL.
There are many different ways to deliver the Excel file too ConvertExceltoCsv, different ways to process the CSV, and different ways to insert into SQL. The above is just one way I have used in the past.
Created on ‎03-27-2020 05:49 AM - edited ‎03-27-2020 05:53 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@murali2425 It sure is possible. I believe anything is possible in NiFi!! The excel processor is: ConvertExcelToCSVProcessor
I have also put an Excel to SQL template on my GitHub:
https://github.com/steven-dfheinz/NiFi-Templates
This template gets an excel file that contains product inventory data (sku, name, price, description, quantity, etc and routes the contents of the excel file to ConvertsExceltoCSV. Then it splits the csv file line by line, parses each line for quantity and sku and uses those attributes to build an insert query, which is finally executed via PutSQL.
There are many different ways to deliver the Excel file too ConvertExceltoCsv, different ways to process the CSV, and different ways to insert into SQL. The above is just one way I have used in the past.
Created on ‎03-28-2020 09:26 AM - edited ‎03-28-2020 09:35 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
great and Thanks it was very useful for my work.
Here I will be having data in the excel, I need to extract the column names(1st row) and form the create the table with primary key and foreign key and data(2nd row) in the database(mysql) from nifi.
