<?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 How to validate/ignore optional value while validating it using 'Validate CSV' processor in Apache NiFi? in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/How-to-validate-ignore-optional-value-while-validating-it/m-p/384637#M245441</link>
    <description>&lt;DIV class="postcell post-layout--right"&gt;&lt;DIV class="s-prose js-post-body"&gt;&lt;P&gt;I'm new to Apache Nifi Community and I got stuck at one point - please help me for the below problem :&lt;/P&gt;&lt;P&gt;In 'Validate CSV' processor I'm giving below schema(&lt;STRONG&gt;schema_used&lt;/STRONG&gt;) to validate the CSV input. But, processor is showing error(&lt;STRONG&gt;err_screenshot&lt;/STRONG&gt;).&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Validate CSV&lt;/STRONG&gt; -&lt;/P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AidenMartin_0-1709718794627.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/39982i89B7DE62E6E78737/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AidenMartin_0-1709718794627.png" alt="AidenMartin_0-1709718794627.png" /&gt;&lt;/span&gt;&lt;P&gt;&lt;STRONG&gt;Schema_Used&lt;/STRONG&gt; - &lt;EM&gt;StrNotNullOrEmpty(), ParseDate("MM/dd/yyyy"), StrNotNullOrEmpty(), StrNotNullOrEmpty(), &lt;FONT color="#FF0000"&gt;Optional()&lt;/FONT&gt;, StrNotNullOrEmpty(), StrNotNullOrEmpty(), StrNotNullOrEmpty(), StrNotNullOrEmpty(), &lt;FONT color="#FF0000"&gt;Optional()&lt;/FONT&gt;, &lt;FONT color="#FF0000"&gt;Optional()&lt;/FONT&gt;, StrNotNullOrEmpty()&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;The above schema is showing below error -&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;err_screenshot&lt;/STRONG&gt; -&lt;/P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AidenMartin_1-1709718875207.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/39983i17B4A0FF100ADD11/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AidenMartin_1-1709718875207.png" alt="AidenMartin_1-1709718875207.png" /&gt;&lt;/span&gt;&lt;P&gt;&lt;STRONG&gt;Note:&lt;/STRONG&gt; The Schema is working totally fine, if I remove 'Optional()'.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Problem&lt;/STRONG&gt; - Please tell me how can I use 'Validate CSV' processor in Apache Nifi and validate Mandatory/Optional Fields of CSV. Also, suggest/share any script(groovy/python) if that can validate the CSV.&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Wed, 06 Mar 2024 09:57:42 GMT</pubDate>
    <dc:creator>AidenMartin</dc:creator>
    <dc:date>2024-03-06T09:57:42Z</dc:date>
    <item>
      <title>How to validate/ignore optional value while validating it using 'Validate CSV' processor in Apache NiFi?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-validate-ignore-optional-value-while-validating-it/m-p/384637#M245441</link>
      <description>&lt;DIV class="postcell post-layout--right"&gt;&lt;DIV class="s-prose js-post-body"&gt;&lt;P&gt;I'm new to Apache Nifi Community and I got stuck at one point - please help me for the below problem :&lt;/P&gt;&lt;P&gt;In 'Validate CSV' processor I'm giving below schema(&lt;STRONG&gt;schema_used&lt;/STRONG&gt;) to validate the CSV input. But, processor is showing error(&lt;STRONG&gt;err_screenshot&lt;/STRONG&gt;).&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Validate CSV&lt;/STRONG&gt; -&lt;/P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AidenMartin_0-1709718794627.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/39982i89B7DE62E6E78737/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AidenMartin_0-1709718794627.png" alt="AidenMartin_0-1709718794627.png" /&gt;&lt;/span&gt;&lt;P&gt;&lt;STRONG&gt;Schema_Used&lt;/STRONG&gt; - &lt;EM&gt;StrNotNullOrEmpty(), ParseDate("MM/dd/yyyy"), StrNotNullOrEmpty(), StrNotNullOrEmpty(), &lt;FONT color="#FF0000"&gt;Optional()&lt;/FONT&gt;, StrNotNullOrEmpty(), StrNotNullOrEmpty(), StrNotNullOrEmpty(), StrNotNullOrEmpty(), &lt;FONT color="#FF0000"&gt;Optional()&lt;/FONT&gt;, &lt;FONT color="#FF0000"&gt;Optional()&lt;/FONT&gt;, StrNotNullOrEmpty()&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;The above schema is showing below error -&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;err_screenshot&lt;/STRONG&gt; -&lt;/P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AidenMartin_1-1709718875207.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/39983i17B4A0FF100ADD11/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AidenMartin_1-1709718875207.png" alt="AidenMartin_1-1709718875207.png" /&gt;&lt;/span&gt;&lt;P&gt;&lt;STRONG&gt;Note:&lt;/STRONG&gt; The Schema is working totally fine, if I remove 'Optional()'.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Problem&lt;/STRONG&gt; - Please tell me how can I use 'Validate CSV' processor in Apache Nifi and validate Mandatory/Optional Fields of CSV. Also, suggest/share any script(groovy/python) if that can validate the CSV.&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 06 Mar 2024 09:57:42 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-validate-ignore-optional-value-while-validating-it/m-p/384637#M245441</guid>
      <dc:creator>AidenMartin</dc:creator>
      <dc:date>2024-03-06T09:57:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to validate/ignore optional value while validating it using 'Validate CSV' processor in Apache NiFi?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-validate-ignore-optional-value-while-validating-it/m-p/384644#M245445</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/109438"&gt;@AidenMartin&lt;/a&gt; ,&lt;/P&gt;&lt;P&gt;According to the documentation of the validate csv apply processors, the Optional has to take&amp;nbsp; a type parameter :&lt;/P&gt;&lt;P&gt;"&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;Schema property:&lt;/STRONG&gt;&amp;nbsp;&lt;/EM&gt;Null, ParseDate("dd/MM/yyyy"), Optional(ParseDouble())&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;Meaning:&lt;/STRONG&gt; the input CSV has three columns, the first one can be null and has no specification, the second one must be a date formatted as expected, and the third one must a double or null (no value).&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;...&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;"&lt;/P&gt;&lt;P&gt;If you are not sure of the data type then just use Null instead of Optional, which means the value can be provided or not.&lt;/P&gt;&lt;P&gt;reference: &lt;A href="https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-standard-nar/1.23.2/org.apache.nifi.processors.standard.ValidateCsv/additionalDetails.html" target="_blank" rel="noopener"&gt;https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-standard-nar/1.23.2/org.apache.nifi.processors.standard.ValidateCsv/additionalDetails.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;If you find this is helpful &lt;STRONG&gt;please&lt;/STRONG&gt; accept solution.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Mar 2024 10:54:05 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-validate-ignore-optional-value-while-validating-it/m-p/384644#M245445</guid>
      <dc:creator>SAMSAL</dc:creator>
      <dc:date>2024-03-06T10:54:05Z</dc:date>
    </item>
  </channel>
</rss>

