title: PutMongoRecord cannot access filename
body: <p>I have a simple flow setup in Nifi:</p>
  
  <ul>
  <li>GetFile picks up CSV files from a directory</li>
  <li>PutMongoRecord stores them in a MongoDB collection (using a CSVReader)</li>
  </ul>
  
  <p>I want to put the records into a collection whose name is derived from the filename: <code>${filename:substringBefore('.csv')}</code>. My problem is that I can't seem to get the PutMongoRecord processor to read the filename. Every time, I get the same error:</p>
  
  <pre><code>com.mongodb.MongoCommandException: Command failed with error 73: 'Invalid namespace specified 'xxx.'' on server localhost:27017. The full response is { "ok" : 0.0, "errmsg" : "Invalid namespace specified 'xxx.'", "code" : 73, "codeName" : "InvalidNamespace" }
  </code></pre>
  
  <p>If I try hard-coding a collection name, it works. It also works with ${hostname()}. Since the processor is connected to the "success" output of GetFile, why isn't it reading the filename?</p>
  
  <p>NOTE: I have tested this with a LogAttribute processor: a <code>filename</code>attribute is indeed present. I have tried various other attributes, but none seem to produce anything.</p>