- 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 read a .DAT file in Nifi
- Labels:
-
Apache NiFi
Created on ‎04-29-2018 03:52 PM - edited ‎09-16-2022 06:09 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Hortonworks,
How can we read a .DAT file in Nifi or transform it in CSV or JSON ? Should I create a custom processor in Java or is a possibility by reading it directly in Nifi ? Thank you !
Kind regards,
Stefan
Created ‎05-04-2018 07:40 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
It wasn't that the case. Anyway, I tried to use UpdateAttribute processor to change the filename to .CSV and it works in this way. Thank you for your time !
Kind regards,
Stefan
Created ‎04-30-2018 12:57 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I guess you need to first give some details on the format or origin of your .DAT file. There is more than just one format associated to this extension.
Created ‎05-02-2018 10:04 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We receive the .DAT files directly from the client which for the normal process that we have in place, ETL using ODI, we are open it in excel. But I wanted to know if there is a way to convert it or read it because we need to store the data of it in a table.
Created ‎05-02-2018 10:55 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
so it has the format of basically providing the sql statements? Like this example from Oracle?
begin insert into ODI_STAGE.SRC_SALES_PERSON1 values (11,'Andrew','Andersen','22/02/1999',sysdate);
insert into ODI_STAGE.SRC_SALES_PERSON1 values
(12,'John','Galagers','20/04/2000',sysdate); end;
If that's the case, you can process and transform the file with Nifi.
And here is a nice tutorial on how to achieve it using GetFile and SplitText processors:
https://community.hortonworks.com/articles/66861/nifi-etl-removing-columns-filtering-rows-changing.h...
Created ‎05-04-2018 07:40 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
It wasn't that the case. Anyway, I tried to use UpdateAttribute processor to change the filename to .CSV and it works in this way. Thank you for your time !
Kind regards,
Stefan
