<?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>topic Re: JSONToFeatures_conversion:  Cannot create a table with a duplicate column in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/jsontofeatures-conversion-cannot-create-a-table/m-p/79427#M6421</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I took the worship layer above, downloaded the JSON output, and ran the following code just fine:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; json &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;# path to JSON file&lt;/SPAN&gt;
&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;JSONToFeatures_conversion&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;json&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"in_memory/worship"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;Result &lt;SPAN class="string token"&gt;'in_memory\\worship'&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;
&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Dec 2021 23:04:01 GMT</pubDate>
    <dc:creator>JoshuaBixby</dc:creator>
    <dc:date>2021-12-10T23:04:01Z</dc:date>
    <item>
      <title>JSONToFeatures_conversion:  Cannot create a table with a duplicate column</title>
      <link>https://community.esri.com/t5/python-questions/jsontofeatures-conversion-cannot-create-a-table/m-p/79421#M6415</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm working on a Python script that bulk downloads layers from feature servers. &amp;nbsp;I download each layer as JSON and then use JSONToFeatures_conversion to convert it to a feature class. &amp;nbsp;The script works okay for the most part, but for some reason about a quarter of the layers fail to convert from JSON to Feature Class.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I consistently receive an Error 206: Cannot create FeatureClass, and it further elaborates that I "cannot create a table with a duplicate column." &amp;nbsp;While that makes sense, this seems odd to me because I'm basically copying valid layers, not adding any columns, and there shouldn't be any duplicate columns. &amp;nbsp;I've also manually converted individual layers using the same workflow just to see if it was a data issue, and I'm able to create feature classes with no problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could someone give me a hint as to what I may be doing wrong?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's how I'm writing my JSON if it helps:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;def write_json(url_response):&lt;BR /&gt;&amp;nbsp; &amp;nbsp; """Writes JSON to a file."""&lt;BR /&gt;&amp;nbsp; &amp;nbsp; with open('downloadFile.json', 'wb') as chunkTemp:&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for chunk in url_response.iter_content(chunk_size=1024): &lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if chunk:&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; try:&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; chunkTemp.write(chunk)&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; except Exception as e:&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; print 'Yuck. ' + str(e)&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; chunkTemp.seek(0) #Go back to the top of the file.&lt;BR /&gt;&amp;nbsp; &amp;nbsp; return chunkTemp&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If it's not obvious, I'm a relative novice with Python and a complete noob when it comes to working with JSON.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Aug 2017 20:26:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/jsontofeatures-conversion-cannot-create-a-table/m-p/79421#M6415</guid>
      <dc:creator>RyanDavis1</dc:creator>
      <dc:date>2017-08-16T20:26:25Z</dc:date>
    </item>
    <item>
      <title>Re: JSONToFeatures_conversion:  Cannot create a table with a duplicate column</title>
      <link>https://community.esri.com/t5/python-questions/jsontofeatures-conversion-cannot-create-a-table/m-p/79422#M6416</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What are the field names?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Aug 2017 21:24:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/jsontofeatures-conversion-cannot-create-a-table/m-p/79422#M6416</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2017-08-16T21:24:15Z</dc:date>
    </item>
    <item>
      <title>Re: JSONToFeatures_conversion:  Cannot create a table with a duplicate column</title>
      <link>https://community.esri.com/t5/python-questions/jsontofeatures-conversion-cannot-create-a-table/m-p/79423#M6417</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ryan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you post the .json and include the link to the service which you exported it from? That would help troubleshoot.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Micah&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Aug 2017 23:09:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/jsontofeatures-conversion-cannot-create-a-table/m-p/79423#M6417</guid>
      <dc:creator>MicahBabinski</dc:creator>
      <dc:date>2017-08-16T23:09:42Z</dc:date>
    </item>
    <item>
      <title>Re: JSONToFeatures_conversion:  Cannot create a table with a duplicate column</title>
      <link>https://community.esri.com/t5/python-questions/jsontofeatures-conversion-cannot-create-a-table/m-p/79424#M6418</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's an example of one of the layers that fails.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Service: &amp;nbsp;&lt;A class="link-titled" href="https://services2.arcgis.com/1cdV1mIckpAyI7Wo/ArcGIS/rest/services/All_Places_of_Worship/FeatureServer" title="https://services2.arcgis.com/1cdV1mIckpAyI7Wo/ArcGIS/rest/services/All_Places_of_Worship/FeatureServer"&gt;https://services2.arcgis.com/1cdV1mIckpAyI7Wo/ArcGIS/rest/services/All_Places_of_Worship/FeatureServer&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;JSON: &amp;nbsp;&lt;A class="link-titled" href="https://services2.arcgis.com/1cdV1mIckpAyI7Wo/ArcGIS/rest/services/All_Places_of_Worship/FeatureServer/0/query?where=OBJECTID%3E=1AND%20OBJECTID%3C=2000&amp;amp;outFields=*&amp;amp;returnGeometry=true&amp;amp;f=pjson" title="https://services2.arcgis.com/1cdV1mIckpAyI7Wo/ArcGIS/rest/services/All_Places_of_Worship/FeatureServer/0/query?where=OBJECTID%3E=1AND%20OBJECTID%3C=2000&amp;amp;outFields=*&amp;amp;returnGeometry=true&amp;amp;f=pjson"&gt;https://services2.arcgis.com/1cdV1mIckpAyI7Wo/ArcGIS/rest/services/All_Places_of_Worship/FeatureServer/0/query?where=OBJ…&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is just one example of maybe 50 or so layers that fail with this error.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Aug 2017 13:05:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/jsontofeatures-conversion-cannot-create-a-table/m-p/79424#M6418</guid>
      <dc:creator>RyanDavis1</dc:creator>
      <dc:date>2017-08-17T13:05:23Z</dc:date>
    </item>
    <item>
      <title>Re: JSONToFeatures_conversion:  Cannot create a table with a duplicate column</title>
      <link>https://community.esri.com/t5/python-questions/jsontofeatures-conversion-cannot-create-a-table/m-p/79425#M6419</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, the different layers have different field names, but here's an example of one of the downloads:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://services2.arcgis.com/1cdV1mIckpAyI7Wo/ArcGIS/rest/services/All_Places_of_Worship/FeatureServer/0/query?where=OBJECTID%3E=1AND%20OBJECTID%3C=2000&amp;amp;outFields=*&amp;amp;returnGeometry=true&amp;amp;f=pjson" title="https://services2.arcgis.com/1cdV1mIckpAyI7Wo/ArcGIS/rest/services/All_Places_of_Worship/FeatureServer/0/query?where=OBJECTID%3E=1AND%20OBJECTID%3C=2000&amp;amp;outFields=*&amp;amp;returnGeometry=true&amp;amp;f=pjson"&gt;https://services2.arcgis.com/1cdV1mIckpAyI7Wo/ArcGIS/rest/services/All_Places_of_Worship/FeatureServer/0/query?where=OBJ…&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't see any duplicates, but maybe I'm missing something obvious.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Aug 2017 13:08:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/jsontofeatures-conversion-cannot-create-a-table/m-p/79425#M6419</guid>
      <dc:creator>RyanDavis1</dc:creator>
      <dc:date>2017-08-17T13:08:16Z</dc:date>
    </item>
    <item>
      <title>Re: JSONToFeatures_conversion:  Cannot create a table with a duplicate column</title>
      <link>https://community.esri.com/t5/python-questions/jsontofeatures-conversion-cannot-create-a-table/m-p/79426#M6420</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;I've also manually converted individual layers using the same workflow just to see if it was a data issue, and I'm able to create feature classes with no problem.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think I was mistaken when I wrote this. &amp;nbsp;Now when I try to manually convert an individual layer through ArcToolbox, I'm getting an error claiming "The workspace is not connected."&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Aug 2017 13:15:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/jsontofeatures-conversion-cannot-create-a-table/m-p/79426#M6420</guid>
      <dc:creator>RyanDavis1</dc:creator>
      <dc:date>2017-08-17T13:15:28Z</dc:date>
    </item>
    <item>
      <title>Re: JSONToFeatures_conversion:  Cannot create a table with a duplicate column</title>
      <link>https://community.esri.com/t5/python-questions/jsontofeatures-conversion-cannot-create-a-table/m-p/79427#M6421</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I took the worship layer above, downloaded the JSON output, and ran the following code just fine:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; json &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;# path to JSON file&lt;/SPAN&gt;
&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;JSONToFeatures_conversion&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;json&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"in_memory/worship"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;Result &lt;SPAN class="string token"&gt;'in_memory\\worship'&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;
&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 23:04:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/jsontofeatures-conversion-cannot-create-a-table/m-p/79427#M6421</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2021-12-10T23:04:01Z</dc:date>
    </item>
    <item>
      <title>Re: JSONToFeatures_conversion:  Cannot create a table with a duplicate column</title>
      <link>https://community.esri.com/t5/python-questions/jsontofeatures-conversion-cannot-create-a-table/m-p/79428#M6422</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The JSONToFeatures Tool does not like the OBJECTID definition in the JSON file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The JSON contains the following in the "fields" section:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&amp;nbsp; "fields" : [
&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "name" : "OBJECTID", 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "type" : "esriFieldTypeInteger", 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "alias" : "OBJECTID", 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "sqlType" : "sqlTypeOther", 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "domain" : null, 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "defaultValue" : null
&amp;nbsp;&amp;nbsp;&amp;nbsp; }, 
&amp;nbsp;&amp;nbsp;&amp;nbsp; {‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Note the setting for "type" which is "esriFieldTypeInteger".&amp;nbsp; When testing it with ArcMap 10.5 using a file geodatabase, the tool wanted to duplicate this field as it wants the type of the OBJECTID to be "esriFieldTypeOID".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are a couple of things you can do.&amp;nbsp; The easiest is to edit the JSON by changing the type on line&amp;nbsp;12 as indicated below.&amp;nbsp; Your script that processes the JSON could include some code to make the edit for you.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;{
&amp;nbsp; "objectIdFieldName" : "OBJECTID", 
&amp;nbsp; "globalIdFieldName" : "", 
&amp;nbsp; "geometryType" : "esriGeometryPoint", 
&amp;nbsp; "spatialReference" : {
&amp;nbsp;&amp;nbsp;&amp;nbsp; "wkid" : 102100, 
&amp;nbsp;&amp;nbsp;&amp;nbsp; "latestWkid" : 3857
&amp;nbsp; }, 
&amp;nbsp; "fields" : [
&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "name" : "OBJECTID", 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "type" : "esriFieldTypeOID", 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "alias" : "OBJECTID", 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "sqlType" : "sqlTypeOther", 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "domain" : null, 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "defaultValue" : null
&amp;nbsp;&amp;nbsp;&amp;nbsp; }, 
&amp;nbsp;&amp;nbsp;&amp;nbsp; {
‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;A second option would&amp;nbsp; be to do a global replace of "OBJECTID" with something like "OBJ_ID" in the JSON file.&amp;nbsp; You would also need to set line 2 to an empty string ( "objectIdFieldName" : "" ).&amp;nbsp; Then the tool would create a new OBJECTID.&amp;nbsp; As this option is a bit more complicated, I would use the first suggestion - just change the type to "esriFieldTypeOID".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 23:04:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/jsontofeatures-conversion-cannot-create-a-table/m-p/79428#M6422</guid>
      <dc:creator>RandyBurton</dc:creator>
      <dc:date>2021-12-10T23:04:04Z</dc:date>
    </item>
    <item>
      <title>Re: JSONToFeatures_conversion:  Cannot create a table with a duplicate column</title>
      <link>https://community.esri.com/t5/python-questions/jsontofeatures-conversion-cannot-create-a-table/m-p/79429#M6423</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is extremely helpful. &amp;nbsp;Thank you. &amp;nbsp;I'll give it a try.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Aug 2017 12:32:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/jsontofeatures-conversion-cannot-create-a-table/m-p/79429#M6423</guid>
      <dc:creator>RyanDavis1</dc:creator>
      <dc:date>2017-08-18T12:32:50Z</dc:date>
    </item>
    <item>
      <title>Re: JSONToFeatures_conversion:  Cannot create a table with a duplicate column</title>
      <link>https://community.esri.com/t5/python-questions/jsontofeatures-conversion-cannot-create-a-table/m-p/79430#M6424</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, &lt;A href="https://community.esri.com/people/rvburton"&gt;rvburton&lt;/A&gt; &amp;nbsp;It's very appreciated. &amp;nbsp;I took your first suggestion and created a function to change the type to "esriFieldTypeOID". &amp;nbsp;I won't try to claim it's the most elegant code, but I'll post it here in case it's helpful to someone later.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;def change_objectID_type(json_file):&lt;BR /&gt;&amp;nbsp; &amp;nbsp; """Changes objectID type from esriFieldTypeInteger to esriFieldTypeOID"""&lt;BR /&gt;&amp;nbsp; &amp;nbsp; with open(json_file, 'rb') as f:&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; json_dict = json.load(f)&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; oid = json_dict['objectIdFieldName']&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; field_list = json_dict['fields']&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for field in field_list:&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if field['name'] == oid:&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; field['type'] = 'esriFieldTypeOID'&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else:&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; pass&lt;BR /&gt;&amp;nbsp; &amp;nbsp; with open(json_file, 'wb') as json_out:&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; json.dump(json_dict, json_out)&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Aug 2017 20:31:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/jsontofeatures-conversion-cannot-create-a-table/m-p/79430#M6424</guid>
      <dc:creator>RyanDavis1</dc:creator>
      <dc:date>2017-08-18T20:31:53Z</dc:date>
    </item>
  </channel>
</rss>

