<?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>idea Import Table — Set text field length to input field's max text value length in ArcGIS Pro Ideas</title>
    <link>https://community.esri.com/t5/arcgis-pro-ideas/import-table-set-text-field-length-to-input-field/idi-p/1552921</link>
    <description>&lt;P&gt;&lt;EM&gt;ArcGIS Pro 2.9.5; Oracle 18c 10.7.1 EGDB&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;When importing a .CSV into an enterprise geodatabase as a standalone table using the Table to Geodatabase geoprocessing tool:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The text field lengths get set to&amp;nbsp;1073741822 characters by default, which is way too long. The max text value length in any of my text fields is 114 characters.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bud_0-1730138569348.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/118263i65A6A46D84BAF3BD/image-size/large?v=v2&amp;amp;px=999" role="button" title="Bud_0-1730138569348.png" alt="Bud_0-1730138569348.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Instead of defaulting to a huge text field length, use the max length of the actual values in the field.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Related:&amp;nbsp;&lt;A href="https://community.esri.com/t5/arcgis-pro-questions/get-maximum-text-value-length-of-multiple-text/m-p/1552914/highlight/true#M89541" target="_self"&gt;Get maximum text value length of multiple text fields&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 23 Jan 2025 01:10:04 GMT</pubDate>
    <dc:creator>Bud</dc:creator>
    <dc:date>2025-01-23T01:10:04Z</dc:date>
    <item>
      <title>Import Table — Set text field length to input field's max text value length</title>
      <link>https://community.esri.com/t5/arcgis-pro-ideas/import-table-set-text-field-length-to-input-field/idi-p/1552921</link>
      <description>&lt;P&gt;&lt;EM&gt;ArcGIS Pro 2.9.5; Oracle 18c 10.7.1 EGDB&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;When importing a .CSV into an enterprise geodatabase as a standalone table using the Table to Geodatabase geoprocessing tool:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The text field lengths get set to&amp;nbsp;1073741822 characters by default, which is way too long. The max text value length in any of my text fields is 114 characters.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bud_0-1730138569348.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/118263i65A6A46D84BAF3BD/image-size/large?v=v2&amp;amp;px=999" role="button" title="Bud_0-1730138569348.png" alt="Bud_0-1730138569348.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Instead of defaulting to a huge text field length, use the max length of the actual values in the field.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Related:&amp;nbsp;&lt;A href="https://community.esri.com/t5/arcgis-pro-questions/get-maximum-text-value-length-of-multiple-text/m-p/1552914/highlight/true#M89541" target="_self"&gt;Get maximum text value length of multiple text fields&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jan 2025 01:10:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-ideas/import-table-set-text-field-length-to-input-field/idi-p/1552921</guid>
      <dc:creator>Bud</dc:creator>
      <dc:date>2025-01-23T01:10:04Z</dc:date>
    </item>
    <item>
      <title>Re: Import Table — Set text field length to input field's max text value length</title>
      <link>https://community.esri.com/t5/arcgis-pro-ideas/import-table-set-text-field-length-to-input-field/idc-p/1553626#M32596</link>
      <description>&lt;P&gt;Use the input CSV and Pandas to find the maximum length&amp;nbsp;value in each field.&amp;nbsp; Something like this:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import pandas as pd

# Read the CSV file into a DataFrame
df = pd.read_csv(r'c:\temp\foo.csv')  # Replace this with your actual file path

# Calculate the maximum length of the data in each field
max_lengths = df.astype(str).applymap(len).max()

# Display the maximum lengths for each field
print(max_lengths)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then use that to create the target FC before population, or try Alter Field after.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Oct 2024 02:30:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-ideas/import-table-set-text-field-length-to-input-field/idc-p/1553626#M32596</guid>
      <dc:creator>MicZatorsky_AEC</dc:creator>
      <dc:date>2024-10-30T02:30:01Z</dc:date>
    </item>
  </channel>
</rss>

