<?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: arcpy.TableToTable_conversion wrong field name and data type conversion   in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/arcpy-tabletotable-conversion-wrong-field-name-and/m-p/867892#M4516</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I Randy,&lt;BR /&gt;many thanks for your support.&lt;BR /&gt;I tried your code, but I am still getting the same issue &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/confused.png" /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/365081_tablewrong3.JPG" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 31 Jul 2017 09:38:06 GMT</pubDate>
    <dc:creator>SimoneAgostini1</dc:creator>
    <dc:date>2017-07-31T09:38:06Z</dc:date>
    <item>
      <title>arcpy.TableToTable_conversion wrong field name and data type conversion</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/arcpy-tabletotable-conversion-wrong-field-name-and/m-p/867881#M4505</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 11pt;"&gt;Hello, &lt;BR /&gt;I created a script in Python to convert a txt tab-delimited table into a Geodatabase table using the ‘Table to Table’ tool. When I run the script it creates the table, but field names and data types are not following the script parameters. Fields in the output table&amp;nbsp;are generally named ‘field1’ ‘field2’ etc… and the ‘Double’ data type are converted as&amp;nbsp;‘text’.&lt;BR /&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11pt;"&gt;This is the script:&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;arcpy.TableToTable_conversion(TXT, GDB, &lt;SPAN style="color: #737300;"&gt;'Output_Table'&lt;/SPAN&gt;, &lt;SPAN style="color: #737300;"&gt;'#'&lt;/SPAN&gt;, &lt;SPAN style="color: #737300;"&gt;r'IDCODE "Field1" true true false 4 Long 0 0 ,First,#,TXT,Field1,-1,-1;PARAM "Field2" true true false 255 Double 5 10 ,First,#,TXT,Field2,-1,-1;LON "Field3" true true false 255 Double 5 10 ,First,#,TXT,Field3,-1,-1;LAT "Field4" true true false 255 Double 5 10 ,First,#,TXT,Field4,-1,-1;VALUE "Field5" true true false 255 Double 5 10 ,First,#,TXT,Field5,-1,-1;REF_ID "Field6" true true false 4 Long 0 0 ,First,#,TXT,Field6,-1,-1;COMMENT "Field7" true true false 255 Text 0 0 ,First,#,TXT.txt,Field7,-1,-1'&lt;/SPAN&gt;, &lt;SPAN style="color: #737300;"&gt;'#'&lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: medium;"&gt;TXT and GDB are two variables containing the paths for the .txt file and the output .gdb &lt;BR /&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: medium;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0cm 0cm 10pt;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: medium;"&gt;The 7 fields should be named: IDCODE, PARAM, LON, LAT, VALUE, REF_ID, COMMENT (I also tried to replace every 'field1,2..etc' in the code above, but I got the same outcome)&lt;BR /&gt;&lt;BR /&gt;Could someone help with this please?&amp;nbsp;is there something wrong in the script os&amp;nbsp;is it a bug in arcpy.TableToTable_conversion?&lt;BR /&gt;&lt;BR /&gt;Thanks &lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: medium;"&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: medium;"&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11pt;"&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: medium;"&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Jul 2017 14:08:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/arcpy-tabletotable-conversion-wrong-field-name-and/m-p/867881#M4505</guid>
      <dc:creator>SimoneAgostini1</dc:creator>
      <dc:date>2017-07-28T14:08:12Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.TableToTable_conversion wrong field name and data type conversion</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/arcpy-tabletotable-conversion-wrong-field-name-and/m-p/867882#M4506</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Does it work ok if you run the tool stand-alone (not scripted)? I have a hard time parsing that string-based field map parameter.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Jul 2017 14:18:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/arcpy-tabletotable-conversion-wrong-field-name-and/m-p/867882#M4506</guid>
      <dc:creator>MicahBabinski</dc:creator>
      <dc:date>2017-07-28T14:18:59Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.TableToTable_conversion wrong field name and data type conversion</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/arcpy-tabletotable-conversion-wrong-field-name-and/m-p/867883#M4507</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you could give a line or two example of what you expect the results to be and what you are actually seeing, that would be helpful.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Jul 2017 14:23:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/arcpy-tabletotable-conversion-wrong-field-name-and/m-p/867883#M4507</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2017-07-28T14:23:43Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.TableToTable_conversion wrong field name and data type conversion</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/arcpy-tabletotable-conversion-wrong-field-name-and/m-p/867884#M4508</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As an aside, ArcPy questions are typically posted to &lt;A href="https://community.esri.com/community/developers/gis-developers/python"&gt;https://community.esri.com/community/developers/gis-developers/python&lt;/A&gt; since ArcPy is a different API than &lt;A href="https://community.esri.com/groups/arcgis-python-api?sr=search&amp;amp;searchId=815c50c2-ab20-49fe-b0ea-a45cef6c6d34&amp;amp;searchIndex=0"&gt;https://community.esri.com/groups/arcgis-python-api?sr=search&amp;amp;searchId=815c50c2-ab20-49fe-b0ea-a45cef6c6d34&amp;amp;searchIndex=0&lt;/A&gt;‌.&amp;nbsp; I realize it is a bit confusing.&amp;nbsp; The growth of places/spaces in GeoNet, even by Esri itself, appears to be taking a more organic approach, much to my chagrin.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Jul 2017 14:33:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/arcpy-tabletotable-conversion-wrong-field-name-and/m-p/867884#M4508</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2017-07-28T14:33:18Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.TableToTable_conversion wrong field name and data type conversion</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/arcpy-tabletotable-conversion-wrong-field-name-and/m-p/867885#M4509</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Micah,&lt;BR /&gt;yes, the stand-alone tool works correctly. Indeed I create the script simply dropping the result of the stand alone&amp;nbsp;tool in to the Python window, and just replaced the Path with my variables.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Jul 2017 14:37:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/arcpy-tabletotable-conversion-wrong-field-name-and/m-p/867885#M4509</guid>
      <dc:creator>SimoneAgostini1</dc:creator>
      <dc:date>2017-07-28T14:37:51Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.TableToTable_conversion wrong field name and data type conversion</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/arcpy-tabletotable-conversion-wrong-field-name-and/m-p/867886#M4510</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Joshua,&lt;BR /&gt;the table properties when I run the stand-alone tool look like this:&lt;BR /&gt;&lt;IMG alt="" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/364892_table_correct.JPG" style="height: 369px;" width="332" /&gt;&lt;BR /&gt;while using the arcpy script the result look like this one:&lt;BR /&gt;&lt;IMG alt="" class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/364893_Table_vrong.JPG" style="height: 396px;" width="330" /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Jul 2017 14:44:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/arcpy-tabletotable-conversion-wrong-field-name-and/m-p/867886#M4510</guid>
      <dc:creator>SimoneAgostini1</dc:creator>
      <dc:date>2017-07-28T14:44:15Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.TableToTable_conversion wrong field name and data type conversion</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/arcpy-tabletotable-conversion-wrong-field-name-and/m-p/867887#M4511</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Shall I post the same question on &lt;A href="https://community.esri.com/community/developers/gis-developers/python"&gt;https://community.esri.com/community/developers/gis-developers/python&lt;/A&gt; and post the link here so if someone else is interessed can just be&amp;nbsp;redirected there? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Jul 2017 14:49:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/arcpy-tabletotable-conversion-wrong-field-name-and/m-p/867887#M4511</guid>
      <dc:creator>SimoneAgostini1</dc:creator>
      <dc:date>2017-07-28T14:49:32Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.TableToTable_conversion wrong field name and data type conversion </title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/arcpy-tabletotable-conversion-wrong-field-name-and/m-p/867888#M4512</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Since we have both mentioned the Python space, it will show up in the feeds over there.&amp;nbsp; I would say you are good for now with this question, in terms of posting in places/spaces.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Jul 2017 14:52:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/arcpy-tabletotable-conversion-wrong-field-name-and/m-p/867888#M4512</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2017-07-28T14:52:16Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.TableToTable_conversion wrong field name and data type conversion</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/arcpy-tabletotable-conversion-wrong-field-name-and/m-p/867889#M4513</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think your syntax to invoke field mapping is incorrect. Check the example below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="language-python line-numbers"&gt;&lt;CODE&gt;arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;TableToTable_conversion&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;in_rows&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"C:/tmp/SelectC01Records.txt"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; out_path&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"C:/tmp/Test.gdb"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; out_name&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Junk"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; where_clause&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;""&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; field_mapping&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;""&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"SegCodeNew "&lt;/SPAN&gt;SegCode" true true false &lt;SPAN class="number token"&gt;6&lt;/SPAN&gt; Text &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;First&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="comment token"&gt;#,C:\tmp\SelectC01Records.txt,SegCode,-1,-1;NM_MPNew "NM_MP" true true false 8 Double 0 0 ,First,#,C:\tmp\SelectC01Records.txt,NM_MP,-1,-1;NM_DesCDNew "NM_DesCD" true true false 4 Long 0 0 ,First,#,C:\tmp\SelectC01Records.txt,NM_DesCD,-1,-1;NM_MPDescNew "NM_MPDesc" true true false 8000 Text 0 0 ,First,#,C:\tmp\SelectC01Records.txt,NM_MPDesc,-1,-1;BrkeyNew "Brkey" true true false 8000 Text 0 0 ,First,#,C:\tmp\SelectC01Records.txt,Brkey,-1,-1""", config_keyword="")&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&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, 28 Jul 2017 17:44:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/arcpy-tabletotable-conversion-wrong-field-name-and/m-p/867889#M4513</guid>
      <dc:creator>MichaelMiller2</dc:creator>
      <dc:date>2017-07-28T17:44:31Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.TableToTable_conversion wrong field name and data type conversion</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/arcpy-tabletotable-conversion-wrong-field-name-and/m-p/867890#M4514</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There were a couple of things in the field mapping that I noticed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First, the "255 Double" should probably be "8 Double" as the field size of a double is 8 bytes.&amp;nbsp; In my tests, the 255 didn't seem to matter as Double may have overridden. But if the field names from the source table are not correct, this may be a problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Second, you are using "TXT.txt" in the comment row mapping.&amp;nbsp; This should probably be the variable TXT which is referencing your source txt/csv file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the field mapping the first reference is to the field name in the new table, followed by (in double quotes) the alias for that field.&amp;nbsp; The source table name&amp;nbsp;is near the end of the mapping; in this case you are using the variable TXT.&amp;nbsp;&amp;nbsp; Following the source table name is the field name in the source table, in this case you appear to be using Field1...Field7 in your txt/csv table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would try:&lt;/P&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;arcpy.TableToTable_conversion(TXT, GDB, 'Output_Table', '#', r'IDCODE "Field1" true true false 4 Long 0 0 ,First,#,TXT,Field1,-1,-1;PARAM "Field2" true true false 8 Double 5 10 ,First,#,TXT,Field2,-1,-1;LON "Field3" true true false 8 Double 5 10 ,First,#,TXT,Field3,-1,-1;LAT "Field4" true true false 8 Double 5 10 ,First,#,TXT,Field4,-1,-1;VALUE "Field5" true true false 8 Double 5 10 ,First,#,TXT,Field5,-1,-1;REF_ID "Field6" true true false 4 Long 0 0 ,First,#,TXT,Field6,-1,-1;COMMENT "Field7" true true false 255 Text 0 0 ,First,#,TXT,Field7,-1,-1', '#')&lt;SPAN class="line-numbers-rows"&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, 28 Jul 2017 18:09:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/arcpy-tabletotable-conversion-wrong-field-name-and/m-p/867890#M4514</guid>
      <dc:creator>RandyBurton</dc:creator>
      <dc:date>2017-07-28T18:09:41Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.TableToTable_conversion wrong field name and data type conversion</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/arcpy-tabletotable-conversion-wrong-field-name-and/m-p/867891#M4515</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I Michael, thanks a lot for your reply.&lt;BR /&gt;Unfortunately I am still getting the same issue.&lt;BR /&gt;&lt;IMG alt="" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/365079_TableWrong2.JPG" style="height: 361px;" width="316" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Jul 2017 09:33:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/arcpy-tabletotable-conversion-wrong-field-name-and/m-p/867891#M4515</guid>
      <dc:creator>SimoneAgostini1</dc:creator>
      <dc:date>2017-07-31T09:33:32Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.TableToTable_conversion wrong field name and data type conversion</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/arcpy-tabletotable-conversion-wrong-field-name-and/m-p/867892#M4516</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I Randy,&lt;BR /&gt;many thanks for your support.&lt;BR /&gt;I tried your code, but I am still getting the same issue &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/confused.png" /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/365081_tablewrong3.JPG" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Jul 2017 09:38:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/arcpy-tabletotable-conversion-wrong-field-name-and/m-p/867892#M4516</guid>
      <dc:creator>SimoneAgostini1</dc:creator>
      <dc:date>2017-07-31T09:38:06Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.TableToTable_conversion wrong field name and data type conversion</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/arcpy-tabletotable-conversion-wrong-field-name-and/m-p/867893#M4517</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you share&amp;nbsp;the first&amp;nbsp;few rows of the table you are trying to convert?&amp;nbsp; Also a few more lines of code showing how TXT and GDB are being set?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Jul 2017 15:59:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/arcpy-tabletotable-conversion-wrong-field-name-and/m-p/867893#M4517</guid>
      <dc:creator>RandyBurton</dc:creator>
      <dc:date>2017-07-31T15:59:50Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.TableToTable_conversion wrong field name and data type conversion</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/arcpy-tabletotable-conversion-wrong-field-name-and/m-p/867894#M4518</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;BR /&gt;the table looks like this&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/365466_example_code.JPG" style="height: auto;" /&gt;&lt;BR /&gt;Some rows have values with 5 decimals in the 3rd and 4th columns.&lt;BR /&gt;Since my original code was created simply dropping the session results outcome of the&amp;nbsp;stand-alond toolbox into the python shell, I fear there could be a bug when arcpy recalls the table to table&amp;nbsp;tool. &lt;BR /&gt;I also noticed that&amp;nbsp;the table to table tool sometime leaves the 3 central coloumn empty&amp;nbsp;and sometimes populates them correctly even if the parameters are all identical, so I often need to repeat twice the same procedure to get a correct conversion.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Aug 2017 09:14:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/arcpy-tabletotable-conversion-wrong-field-name-and/m-p/867894#M4518</guid>
      <dc:creator>SimoneAgostini1</dc:creator>
      <dc:date>2017-08-03T09:14:12Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.TableToTable_conversion wrong field name and data type conversion</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/arcpy-tabletotable-conversion-wrong-field-name-and/m-p/867895#M4519</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the image of the table.&amp;nbsp; It was key to the answer.&amp;nbsp; And, the tool acts differently outside ArcMap; it creates its own data map apparently ignoring the parameter (using version&amp;nbsp;10.2.1). *** EDIT:&amp;nbsp; By inside ArcMap, I mean running the tool from ArcToolbox.&amp;nbsp; By outside, I mean from a Python IDE with ArcMap closed,&amp;nbsp;although running the results snippet in ArcMap's Python window&amp;nbsp;showed similar issues. ***&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, regarding the table (a tab delimited text file):&amp;nbsp; ArcMap sees a column with a 0 (integer) in the first row and 22.32 (double)&amp;nbsp;in the second as "text".&amp;nbsp; My first recommendation is to change the numbers in the first row&amp;nbsp; from this:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;100&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;200&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;!!
101&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;10&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;22.32&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;67.58&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;5.12&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;200&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;!!
102&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;20&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;50.55&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;84.12&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;3.65&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;200&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;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;To this (so ArcMap will see them as doubles):&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;100&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;0.0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;0.0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;0.0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;200&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;!!
101&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;10&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;22.32&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;67.58&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;5.12&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;200&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;!!
102&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;20&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;50.55&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;84.12&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;3.65&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;200&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;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since there is no header row with field names, ArcMap will default to "Field1", "Field2", etc. So my second suggestion is to add a tab delimited header row, such as:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;IDCODE&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;PARAM&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;LON&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;LAT&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;VALUE&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;REF_ID&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;COMMENT
100&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;0.0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;0.0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;0.0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;200&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;!!
101&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;10&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;22.32&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;67.58&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;5.12&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;200&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;!!
102&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;20&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;50.55&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;84.12&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;3.65&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;200&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;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;This will name your fields with something meaningful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I ran the tool outside ArcMap, I first used the following code with a data file without a header:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; arcpy

TXT &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; r&lt;SPAN class="string token"&gt;"C:/Path/To/data.txt"&lt;/SPAN&gt;
GDB &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; r&lt;SPAN class="string token"&gt;"C:/Path/To/Default.gdb"&lt;/SPAN&gt;
TBL &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"table2table"&lt;/SPAN&gt;

arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;TableToTable_conversion&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;TXT&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;GDB&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;TBL&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;"&lt;SPAN class="comment token"&gt;#","""IDCODE "Field1" true true false 4 Long 0 0 ,First,#,TXT,Field1,-1,-1;PARAM "Field2" true true false 4 Long 0 0 ,First,#,TXT,Field2,-1,-1;LON "Field3" true true false 255 Double 0 0 ,First,#,TXT,Field3,-1,-1;LAT "Field4" true true false 255 Double 0 0 ,First,#,TXT,Field4,-1,-1;VALUE "Field5" true true false 255 Double 0 0 ,First,#,TXT,Field5,-1,-1;REF_ID "Field6" true true false 4 Long 0 0 ,First,#,TXT,Field6,-1,-1;COMMENT "Field7" true true false 255 Text 0 0 ,First,#,TXT,Field7,-1,-1""","#")‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍&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;/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;Although the map contains the target field names ("IDCODE", etc.), when the table was created, "Field1"..."Field7" were used.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I then used the version of the data table with the header (field names) and removed the field mapping, and it created the expected result.&amp;nbsp; &lt;STRONG&gt;NOTE: This was tested with ArcMap version 10.2.1.&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; arcpy

TXT &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; r&lt;SPAN class="string token"&gt;"C:/Path/To/data.txt"&lt;/SPAN&gt;
GDB &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; r&lt;SPAN class="string token"&gt;"C:/Path/To/Default.gdb"&lt;/SPAN&gt;
TBL &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"table2table"&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;# tested with ArcMap version 10.2.1&lt;/SPAN&gt;
arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;TableToTable_conversion&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;TXT&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;GDB&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;TBL&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;"&lt;SPAN class="comment token"&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;/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;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="365667" alt="Final Table" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/365667_final.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 10:48:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/arcpy-tabletotable-conversion-wrong-field-name-and/m-p/867895#M4519</guid>
      <dc:creator>RandyBurton</dc:creator>
      <dc:date>2021-12-12T10:48:20Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.TableToTable_conversion wrong field name and data type conversion</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/arcpy-tabletotable-conversion-wrong-field-name-and/m-p/867896#M4520</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Randy,&lt;BR /&gt;that's super!!! Awesome &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&amp;nbsp;It worked perfectly. &lt;BR /&gt;Many thanks for you help&lt;BR /&gt;Today I solved the problem and learned something new!&lt;BR /&gt;&lt;BR /&gt;Cheers &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/grin.png" /&gt;&amp;nbsp;&lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/grin.png" /&gt;&amp;nbsp;&lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/grin.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Aug 2017 09:34:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/arcpy-tabletotable-conversion-wrong-field-name-and/m-p/867896#M4520</guid>
      <dc:creator>SimoneAgostini1</dc:creator>
      <dc:date>2017-08-04T09:34:04Z</dc:date>
    </item>
  </channel>
</rss>

