<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: Replacing Custom NiFi Processor for Converting JSON Content to Attributes in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Replacing-Custom-NiFi-Processor-for-Converting-JSON-Content/m-p/408326#M252683</link>
    <description>&lt;P&gt;You can use a Groovy script with the&amp;nbsp;&lt;EM&gt;ExecuteGroovyScript &lt;/EM&gt;processor.&lt;/P&gt;&lt;P&gt;See this answer &lt;A title="NiFi - convert everything in json to attributes, not one by one (i.e JsonToAttributes)" href="https://community.cloudera.com/t5/Support-Questions/NiFi-convert-everything-in-json-to-attributes-not-one-by-one/m-p/192812" target="_blank" rel="noopener"&gt;here&lt;/A&gt; for details&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 14 May 2025 08:39:18 GMT</pubDate>
    <dc:creator>linssab</dc:creator>
    <dc:date>2025-05-14T08:39:18Z</dc:date>
    <item>
      <title>Replacing Custom NiFi Processor for Converting JSON Content to Attributes</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Replacing-Custom-NiFi-Processor-for-Converting-JSON-Content/m-p/408159#M252667</link>
      <description>&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;I'm currently using a custom NiFi processor to convert JSON file content into flow file attributes, and I'm looking to replace it with a standard NiFi processor if possible.&lt;/P&gt;&lt;P&gt;Sample JSON Input:&lt;BR /&gt;The JSON files look like this (keys may vary per file):&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;{&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;"SourceFilePath": "/root/rdw/SrcFiles",&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;"SourceFilePattern": "Sales_data",&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;"SourceFile": "Sales_data_20241211.csv"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;}&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;Current Setup:&lt;/STRONG&gt;&lt;BR /&gt;I'm using a custom processor of type CreateFlatJSON (Bundle: NestedJSONToFlatJSON) to extract the key-value pairs from the JSON and assign them to attributes.&lt;/P&gt;&lt;P&gt;After processing, the flow file attributes look like:&lt;BR /&gt;SourceFilePath = /root/rdw/SrcFiles&lt;BR /&gt;SourceFile = Sales_data_20231111164536.csv&lt;BR /&gt;SourceFilePattern = Sales_data&lt;/P&gt;&lt;P&gt;These attributes are then used in downstream processors like so:&lt;BR /&gt;${SourceFilePath}/${SourceFile}&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Current Flow:&lt;/STRONG&gt;&lt;BR /&gt;FetchSFTP → ExtractText → CreateFlatJSON (Custom) → Downstream Processors&lt;BR /&gt;FetchSFTP: Retrieves the JSON file.&lt;BR /&gt;ExtractText: Reads the content into the flow file.&lt;BR /&gt;CreateFlatJSON: Parses JSON and converts key-value pairs to attributes.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Question&lt;/STRONG&gt;&lt;BR /&gt;Is there a standard NiFi processor that can replace the custom CreateFlatJSON processor and achieve the same functionality — i.e., convert JSON content in the flow file into flow file attributes (with dynamic keys/values)?&lt;/P&gt;</description>
      <pubDate>Tue, 21 Apr 2026 06:19:28 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Replacing-Custom-NiFi-Processor-for-Converting-JSON-Content/m-p/408159#M252667</guid>
      <dc:creator>s198</dc:creator>
      <dc:date>2026-04-21T06:19:28Z</dc:date>
    </item>
    <item>
      <title>Re: Replacing Custom NiFi Processor for Converting JSON Content to Attributes</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Replacing-Custom-NiFi-Processor-for-Converting-JSON-Content/m-p/408300#M252680</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/109766"&gt;@s198&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I can't think of any NiFi stock processors that would create dynamic attributes nor can I figure out why you would so this.&amp;nbsp; I understand that you are using these "dynamic" ("&lt;SPAN&gt;${SourceFilePath}/${SourceFile}")&lt;/SPAN&gt; attributes downstream in your dataflow&lt;SPAN&gt;, but to do so you are configuring these strings in that downstream processor meaning you need to know what they will be before even starting your processors.&amp;nbsp; &amp;nbsp;If that is the case, these are not really dynamic since you need to know what they are to configure your downstream processors.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;If the following strings exist in all your source json, you can just declare them manually with EvaluateJsonPath processor to get the corresponding values from the FlowFile content:&lt;BR /&gt;&lt;BR /&gt;SourceFilePath&amp;nbsp;&lt;BR /&gt;SourceFile&amp;nbsp;&lt;BR /&gt;SourceFilePattern&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Can you share more info about your complete dataflow for better understanding?&lt;BR /&gt;What is happening downstream of your custom processor?&lt;BR /&gt;&lt;BR /&gt;Thank you,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Matt&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 13 May 2025 19:33:09 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Replacing-Custom-NiFi-Processor-for-Converting-JSON-Content/m-p/408300#M252680</guid>
      <dc:creator>MattWho</dc:creator>
      <dc:date>2025-05-13T19:33:09Z</dc:date>
    </item>
    <item>
      <title>Re: Replacing Custom NiFi Processor for Converting JSON Content to Attributes</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Replacing-Custom-NiFi-Processor-for-Converting-JSON-Content/m-p/408326#M252683</link>
      <description>&lt;P&gt;You can use a Groovy script with the&amp;nbsp;&lt;EM&gt;ExecuteGroovyScript &lt;/EM&gt;processor.&lt;/P&gt;&lt;P&gt;See this answer &lt;A title="NiFi - convert everything in json to attributes, not one by one (i.e JsonToAttributes)" href="https://community.cloudera.com/t5/Support-Questions/NiFi-convert-everything-in-json-to-attributes-not-one-by-one/m-p/192812" target="_blank" rel="noopener"&gt;here&lt;/A&gt; for details&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 May 2025 08:39:18 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Replacing-Custom-NiFi-Processor-for-Converting-JSON-Content/m-p/408326#M252683</guid>
      <dc:creator>linssab</dc:creator>
      <dc:date>2025-05-14T08:39:18Z</dc:date>
    </item>
    <item>
      <title>Re: Replacing Custom NiFi Processor for Converting JSON Content to Attributes</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Replacing-Custom-NiFi-Processor-for-Converting-JSON-Content/m-p/408550#M252738</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/35454"&gt;@MattWho&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/97121"&gt;@linssab&lt;/a&gt;&amp;nbsp;for the help.&lt;BR /&gt;&lt;BR /&gt;The &lt;SPAN&gt;Groovy script with the&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;ExecuteScript&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/EM&gt;&lt;SPAN&gt;processor is working fine to convert JSON file content to flow file attributes.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 21 May 2025 06:28:45 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Replacing-Custom-NiFi-Processor-for-Converting-JSON-Content/m-p/408550#M252738</guid>
      <dc:creator>s198</dc:creator>
      <dc:date>2025-05-21T06:28:45Z</dc:date>
    </item>
  </channel>
</rss>

