title: Flowfile absolute path Nifi
body: <p>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 <strong>UpdateAttribute</strong> processor and passing that query to <strong>PutSQL</strong> after updating the parameters to do bulk load.</p>
  
  <pre><code>LOAD DATA INFILE '${absolute.path}${filename}' INTO TABLE ${dest.database}.${db.table.name} FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'
  </code></pre>
  
  <p>When I ran the flow it's failing saying file not found exception.  </p>
  
  <pre><code>. There were a total of 1 FlowFiles that failed, 0 that succeeded, and 0 that were not execute and will be routed to retry; : java.sql.BatchUpdateException: Unable to open file 'data.csv'for 'LOAD DATA INFILE command.Due to underlying IOException:`
  
  ** BEGIN NESTED EXCEPTION ** 
  
  java.io.FileNotFoundException
  MESSAGE: data.csv (No such file or directory)
  java.io.FileNotFoundException: data.csv (No such file or directory).
  </code></pre>
  
  <p>Here MySQL Server and Nifi are on different nodes so I can't use LOAD DATA LOCAL INFILE query.</p>
  
  <p>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.</p>
  
  <p>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. </p>
  
  <p><strong>Working:</strong></p>
  
  <pre><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'}
  </code></pre>
  
  <p>Question is how to get the absolute path of the flow file and load the same flow file into mysql.</p>
  
  <p><strong>Flow:</strong></p>
  
  <p><a href="https://i.stack.imgur.com/DiJKO.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/DiJKO.png" alt="enter image description here"></a></p>