Github user mans2singh commented on the issue:

    https://github.com/apache/nifi/pull/2686
  
    @ijokarumawak - 
    
    I've created two flow templates for testing the DL4J processor.  
    
    The first with a file input and file output. The second flow reads a row 
from rdbms based on id input file containing the single id, classifies the 
observation and save the classification results in same row.  
    
    The supporting files along with a sample classification model that will 
work with the two templates are in the repository 
[nifi-flow-examples](https://github.com/mans2singh/nifi-flow-examples.git) 
branch nifi-dl4j-flow.  
    
    Here are some details of the two flow templates:
    
    1. The first template is simple one 
[NifiDL4JFileInputOutput.xml](https://github.com/mans2singh/nifi-flow-examples/blob/nifi-dl4j-flow/dl4jtemplate/NifiDL4JFileInputOutput.xml)
 that ingests file containing an observation record from directory (sample 
input in dl4jinput), applies the classification model and writes results to the 
output directory with the same file name as input.  In this scenario, the 
correlation is based on the file names.
    
    2. The second 
[NifiDL4JFileToRdbms.xml](https://github.com/mans2singh/nifi-flow-examples/blob/nifi-dl4j-flow/dl4jtemplate/NifiDL4JFileToRdbms.xml)
 reads a single id from input file (sample in dl4jinputid directory), queries a 
rdbms table for the observations for the input id, classifies the observation 
and updates the db row with classification results.  In this flow template, the 
row id of the input is used as a correlation id which is used to update the 
output column of the corresponding row after the classification is done. The 
flow uses other Nifi processors to ingest, transform, save the classification 
results.  The table creation and observation row insertion commands are in 
dl4jsql directory. 
    
    The flow templates require setting the appropriate input/output files, dl4j 
model, db controller and rdbms table with the records.
    
    Please let me know your thoughts/feedback.
    
    Thanks
    
    Mans


---

Reply via email to