<?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: Can't redefine org.apache.nifi.dataType - Schema error in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Can-t-redefine-org-apache-nifi-dataType-Schema-error/m-p/336015#M232097</link>
    <description>&lt;P&gt;Thank you very much&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/11191"&gt;@araujo&lt;/a&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Finally, I manage to solve that, I'm just unsure about the true cause tho. What I did was, on the service that writes the JSON, in the "Schema Access Strategy" instead of using "Inherit Schema" I used the "Schema Text" property, and used that same schema. ( I already had it into the reader ).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I suspect that somehow, the schemas that NiFi was generating, contained duplicated data, but I have no hard evidence on that so, it's just speculation.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 10 Feb 2022 20:13:34 GMT</pubDate>
    <dc:creator>hjfigueira</dc:creator>
    <dc:date>2022-02-10T20:13:34Z</dc:date>
    <item>
      <title>Can't redefine org.apache.nifi.dataType - Schema error</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Can-t-redefine-org-apache-nifi-dataType-Schema-error/m-p/335919#M232064</link>
      <description>&lt;P&gt;Hi Guys,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm currently having an issue where a schema that I'm using is erroring out in a RecordLookup processor ( with a Rest Service ). The message I get is the one in the title of this post, "Can't redefine org.apache.nifi.dataType". Below you can find the schema that I'm using.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;{
  "type": "record",
  "name": "FullTicketData",
  "fields": [
    {
      "name" : "terminal",
      "type": {
        "type": "record",
        "name" : "terminal_array",
        "fields": [
          {
            "name": "success",
            "type": "string"
          },
          {
            "name": "data",
            "type": {
              "type": "array",
              "items": {
                "name": "data_array",
                "type": "record",
                "fields": [
                  {
                    "name": "ID",
                    "type": "int"
                  }
                ]
              }
            }
          },
          {
            "name": "count",
            "type": "int"
          }
        ]
      }
    },
    {
      "name" : "driver",
      "type": {
        "type": "record",
        "name" : "driver",
        "fields": [
          {
            "name": "success",
            "type": "string"
          },
          {
            "name": "data",
            "type": {
              "type": "array",
              "items": {
                "name": "data_record",
                "type": "record",
                "fields": [
                  {
                    "name": "ID",
                    "type": "int"
                  }
                ]
              }
            }
          },
          {
            "name": "count",
            "type": "int"
          }
        ]
      }
    },
    {
      "name": "ticket",
      "type": {
        "name" : "ticket",
        "type" : "record",
        "fields": [
          {
            "name": "success",
            "type": "string"
          },
          {
            "name": "data",
            "type": {
              "name": "data",
              "type": "record",
              "fields": [
                {
                  "name": "ID",
                  "type": "int"
                },
                {
                  "name": "job",
                  "type": {
                    "name": "job",
                    "type": "record",
                    "fields": [
                      {
                        "name": "ID",
                        "type": "int"
                      }
                    ]
                  }
                }
              ]
            }
          }
        ]
      }
    },
    {
      "name": "order",
      "type": {
        "name": "order",
        "type": "record",
        "fields": [
          {
            "name": "externalJobNo",
            "type": "string"
          },
          {
            "name": "jobNo",
            "type": "string"
          },
          {
            "name": "driverName",
            "type": "string"
          },
          {
            "name": "startTime",
            "type": "string"
          },
          {
            "name": "endTime",
            "type": "string"
          },
          {
            "name": "comment",
            "type": "string",
            "default": "empty"
          },
          {
            "name": "readStart",
            "type": "string",
            "default": "0"
          },
          {
            "name": "readEnd",
            "type": "string",
            "default": "0"
          },
          {
            "name": "removed",
            "type": "string"
          },
          {
            "name": "installed",
            "type": "string"
          },
          {
            "name": "endTopCut",
            "type": "string"
          },
          {
            "name": "endBottomCut",
            "type": "string"
          },
          {
            "name": "startTemp",
            "type": "string"
          },
          {
            "name": "endTemp",
            "type": "string"
          },
          {
            "name": "swPer",
            "type": "string"
          },
          {
            "name": "gravity",
            "type": "string"
          },
          {
            "name": "volume",
            "type": "string"
          },
          {
            "name": "grossVolume",
            "type": "string"
          },
          {
            "name": "temp",
            "type": "string"
          },
          {
            "name": "dist",
            "type": "string"
          },
          {
            "name": "explanation",
            "type": "string"
          },
          {
            "name": "status",
            "type": "string"
          },
          {
            "name": "driverID",
            "type": "int"
          },
          {
            "name": "billingQuestionComment",
            "type": "string",
            "default": "empty"
          }
        ]
      }
    },
    {
      "name": "jobTimeType",
      "type": {
        "name": "jobTimeType",
        "type": "record",
        "fields": [
          {
            "name": "startTime",
            "type": "string"
          },
          {
            "name": "endTime",
            "type": "string"
          },
          {
            "name": "startlatitude",
            "type": "string"
          },
          {
            "name": "startlongitude",
            "type": "string"
          },
          {
            "name": "endlatitude",
            "type": "string"
          },
          {
            "name": "endlongitude",
            "type": "string"
          }
        ]
      }
    },
    {
      "name": "jobTimeTypeTerminal",
      "type": {
        "name": "jobTimeTypeTerminal",
        "type": "record",
        "fields": [
          {
            "name": "terminal",
            "type": "string"
          },
          {
            "name": "startTime",
            "type": "string"
          },
          {
            "name": "endTime",
            "type": "string"
          },
          {
            "name": "startlatitude",
            "type": "string"
          },
          {
            "name": "startlongitude",
            "type": "string"
          },
          {
            "name": "endlatitude",
            "type": "string"
          },
          {
            "name": "endlongitude",
            "type": "string"
          }
        ]
      }
    }
  ]
}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And the data, that it maps. BTW, this is just an example data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;{
    "terminal": {
        "success": "string",
        "data": [
            {
                "ID": 0
            }
        ],
        "count": 0
    },
    "driver": {
        "success": "string",
        "data": [
            {
                "ID": 0
            }
        ],
        "count": 0
    },
    "ticket": {
        "success": "string",
        "data": {
            "ID": 0,
            "job": {
                "ID": 0
            }
        }
    },
    "order": {
        "externalJobNo": "string",
        "jobNo": "string",
        "driverName": "string",
        "startTime": "string",
        "endTime": "string",
        "comment": "string",
        "readStart": "string",
        "readEnd": "string",
        "removed": "string",
        "installed": "string",
        "endTopCut": "string",
        "endBottomCut": "string",
        "startTemp": "string",
        "endTemp": "string",
        "swPer": "string",
        "gravity": "string",
        "volume": "string",
        "grossVolume": "string",
        "temp": "string",
        "dist": "string",
        "explanation": "string",
        "status": "string",
        "driverID": 0,
        "billingQuestionComment": "string"
    },
    "jobTimeType": {
        "startTime": "string",
        "endTime": "string",
        "startlatitude": "string",
        "startlongitude": "string",
        "endlatitude": "string",
        "endlongitude": "string"
    },
    "jobTimeTypeTerminal": {
        "terminal": "string",
        "startTime": "string",
        "endTime": "string",
        "startlatitude": "string",
        "startlongitude": "string",
        "endlatitude": "string",
        "endlongitude": "string"
    }
}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So, for testing, I tried to use the GenerateFlowFile processor, with the exact sample data above, and a ConvertRecord processor set to Infer Schema, to make NiFi generate the schema so I can spot any errors, but when I do that, I get the same error message.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The last piece of information I have is that this error started when I added the "terminal" and the "driver" JSON attributes. Without it, everything seems to work correctly.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hjfigueira_0-1644431476877.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/33509iD31E0EAECD247027/image-size/medium?v=v2&amp;amp;px=400" role="button" title="hjfigueira_0-1644431476877.png" alt="hjfigueira_0-1644431476877.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Feb 2022 19:22:37 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Can-t-redefine-org-apache-nifi-dataType-Schema-error/m-p/335919#M232064</guid>
      <dc:creator>hjfigueira</dc:creator>
      <dc:date>2022-02-09T19:22:37Z</dc:date>
    </item>
    <item>
      <title>Re: Can't redefine org.apache.nifi.dataType - Schema error</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Can-t-redefine-org-apache-nifi-dataType-Schema-error/m-p/335947#M232070</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/89696"&gt;@hjfigueira&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I ran a test with your schema and data and it worked without problems for me.&lt;/P&gt;&lt;P&gt;I think there's something else in your environment that hasn't been described here that's contributing to the problem.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;André&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Feb 2022 03:47:11 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Can-t-redefine-org-apache-nifi-dataType-Schema-error/m-p/335947#M232070</guid>
      <dc:creator>araujo</dc:creator>
      <dc:date>2022-02-10T03:47:11Z</dc:date>
    </item>
    <item>
      <title>Re: Can't redefine org.apache.nifi.dataType - Schema error</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Can-t-redefine-org-apache-nifi-dataType-Schema-error/m-p/336015#M232097</link>
      <description>&lt;P&gt;Thank you very much&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/11191"&gt;@araujo&lt;/a&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Finally, I manage to solve that, I'm just unsure about the true cause tho. What I did was, on the service that writes the JSON, in the "Schema Access Strategy" instead of using "Inherit Schema" I used the "Schema Text" property, and used that same schema. ( I already had it into the reader ).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I suspect that somehow, the schemas that NiFi was generating, contained duplicated data, but I have no hard evidence on that so, it's just speculation.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Feb 2022 20:13:34 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Can-t-redefine-org-apache-nifi-dataType-Schema-error/m-p/336015#M232097</guid>
      <dc:creator>hjfigueira</dc:creator>
      <dc:date>2022-02-10T20:13:34Z</dc:date>
    </item>
    <item>
      <title>Re: Can't redefine org.apache.nifi.dataType - Schema error</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Can-t-redefine-org-apache-nifi-dataType-Schema-error/m-p/336022#M232102</link>
      <description>&lt;P&gt;Which version of NiFi are you using?&lt;/P&gt;</description>
      <pubDate>Thu, 10 Feb 2022 23:33:01 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Can-t-redefine-org-apache-nifi-dataType-Schema-error/m-p/336022#M232102</guid>
      <dc:creator>araujo</dc:creator>
      <dc:date>2022-02-10T23:33:01Z</dc:date>
    </item>
    <item>
      <title>Re: Can't redefine org.apache.nifi.dataType - Schema error</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Can-t-redefine-org-apache-nifi-dataType-Schema-error/m-p/336118#M232141</link>
      <description>&lt;P&gt;1.13.2&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hjfigueira_0-1644593352258.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/33536i68B9F91F9724D5DF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="hjfigueira_0-1644593352258.png" alt="hjfigueira_0-1644593352258.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Feb 2022 15:29:25 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Can-t-redefine-org-apache-nifi-dataType-Schema-error/m-p/336118#M232141</guid>
      <dc:creator>hjfigueira</dc:creator>
      <dc:date>2022-02-11T15:29:25Z</dc:date>
    </item>
    <item>
      <title>Re: Can't redefine org.apache.nifi.dataType - Schema error</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Can-t-redefine-org-apache-nifi-dataType-Schema-error/m-p/336145#M232154</link>
      <description>&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 11 Feb 2022 21:52:06 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Can-t-redefine-org-apache-nifi-dataType-Schema-error/m-p/336145#M232154</guid>
      <dc:creator>araujo</dc:creator>
      <dc:date>2022-02-11T21:52:06Z</dc:date>
    </item>
  </channel>
</rss>

