Member since
03-05-2018
18
Posts
2
Kudos Received
0
Solutions
03-30-2018
08:49 AM
@Dan Chaffelson, I created a simple sh file as place the conda activate condaenv/source activate condaenv command and triggered it in command prompt and is working as expected(env is getting activated), however when I triggered the same sh file from Nifi(ExecuteStreamCommand), I'm getting error like conda not found. Not sure what's happening and why the same sh file working in prompt and not in Nifi. Any suggestions please.
... View more
03-29-2018
06:28 AM
I have python project(have multiple script files and one main script file which triggers other script files). I can able to execute the project in my local machine. I activated the conda environment in my local machine from there the project is picking all the required dependencies(there are lot of dependencies both native and non-native) and executing the project. Now I want execute the same project in Nifi. As the project have the dependency modules not sure how to pick those modules as part of the Nifi flow(With Conda env or as part of path).
... View more
Labels:
- Labels:
-
Apache NiFi
03-21-2018
12:05 PM
Writing flowfiles to disk will be costly operation as the size of the flow files is huge and there are lots of such flow files. Any alternative solution apart from writing contents of flowfiles to disk?
... View more
03-21-2018
11:18 AM
If I understood correctly, it's like writing the file to disk and using that file as part of load data infile command? Did my understanding correct?
... View more
03-21-2018
10:10 AM
MySQL Server and Nifi Server are not running on the same machine. Did you mean copying the flow files into local server and from there LOAD DATA?
... View more
03-21-2018
09:36 AM
@youngick kim, Could you please elaborate your answer(NiFi save csv --> MySQL local CSV). MySQL local CSV, I didn't get this one.
... View more
03-21-2018
07:19 AM
I have billions of rows in SQL Server tables and I'm using Nifi to load those rows into MySQL. I tried using putSQL and PutDatabaseRecord both are satisfying the requirement, however they are taking quite long time to load the into MySQL(100k records per minute, for 1 billion it might be 1000+ minutes) as they are doing it record by record. Do we have any bulk load option to load the AVRO/CSV flowfiles into MySQL in Nifi. Could you please suggest an option. Here is my Flow : ListDataBaseTables -> GenerateTableFecth(partition size= 50k records) -> Execute SQL -> ConvertRecord(Avro to CSV) -> PutSQL ListDataBaseTables -> GenerateTableFecth(partition size= 50k records) -> Execute SQL(Avro) -> PutDatabaseRecord.
... View more
Labels:
- Labels:
-
Apache NiFi
03-21-2018
05:26 AM
Hi @Rahul Soni, I tried the approach and it's working as expected, however there are billions of records I need to write to MySQL table and when I checked the performance for PutDatabaseRecord, it's taking quite long time. As other possible solution to improve the performance(Bulk load data into MySQL).
... View more
03-20-2018
09:30 AM
I'm trying to load the flow files into MySQL database using bulk load option. Below is the query I'm using as part of the UpdateAttribute processor and passing that query to PutSQL after updating the parameters to do bulk load. LOAD DATA INFILE '${absolute.path}${filename}' INTO TABLE ${dest.database}.${db.table.name} FIELDS TERMINATED BY',' LINES TERMINATED BY'\n' When I ran the flow it's failing saying file not found exception. There were a total of1 FlowFiles that failed,0 that succeeded,and0 that were notexecuteand will be routed to retry;: java.sql.BatchUpdateException: Unable toopenfile'data.csv'for'LOAD DATA INFILE command.Due to underlying IOException:`**BEGIN NESTED EXCEPTION **
java.io.FileNotFoundException
MESSAGE: data.csv (No such fileor directory)
java.io.FileNotFoundException: data.csv (No such fileor directory). Here MySQL Server and Nifi are on different nodes so I can't use LOAD DATA LOCAL INFILE query. I'm not sure why I'm getting file not found exception even though I mentioned the complete absolute path of the flow file in the SQL Query. When I use query with hard coded file name and providing the absolute path of the file in nifi node, it's working as expected. Working: <code>LOAD DATA LOCAL INFILE '/path/in/nifi/node/to/file/data.csv' INTO TABLE ${dest.database}.${db.table.name} FIELDS TERMINATED BY',' LINES TERMINATED BY'\n'} Question is how to get the absolute path of the flow file and load the same flow file into mysql. Flow:
... View more
Labels:
- Labels:
-
Apache NiFi
03-08-2018
04:47 PM
Hi @Shu, I made the changes as you suggested and it worked. I added one extra processor(Execute SQL). I'm posting the flow here so that it might help someone like me in future who are having same requirement. Really appreciate your help. Thanks a lot.
... View more