<?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 Define data type for enterprise gdb feature class fields using python script and a csv template in ArcGIS Enterprise Questions</title>
    <link>https://community.esri.com/t5/arcgis-enterprise-questions/define-data-type-for-enterprise-gdb-feature-class/m-p/1174221#M33142</link>
    <description>&lt;P&gt;Is there a way to create a feature class from a table and limit the size of fields/define what field type they should be? I have a script that will use a csv template made from the original table to create a feature class. i would like to keep using this method (or a similar one) as the fields may not always be the same across all the tables I want to run this script on.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Brief outline of what the script does:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;export the SQL server table to csv&lt;/LI&gt;&lt;LI&gt;create an enterprise gdb&lt;/LI&gt;&lt;LI&gt;use the csv as a template to create a feature class&lt;/LI&gt;&lt;LI&gt;append the data from the csv to the feature class&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;However, this makes all text fields be &lt;STRONG&gt;nvarchar(MAX)&lt;/STRONG&gt;, in the original table they are &lt;STRONG&gt;nvarchar(50)&lt;/STRONG&gt;. I also have a datetime field that was &lt;STRONG&gt;datetime&lt;/STRONG&gt; and is now also &lt;STRONG&gt;nvarchar(MAX)&lt;/STRONG&gt;. Finally,&amp;nbsp;the lat/long fields were &lt;STRONG&gt;decimal(24,7)&lt;/STRONG&gt; but are now &lt;STRONG&gt;numeric(38,8)&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 16 May 2022 16:03:05 GMT</pubDate>
    <dc:creator>CaraWiebalk</dc:creator>
    <dc:date>2022-05-16T16:03:05Z</dc:date>
    <item>
      <title>Define data type for enterprise gdb feature class fields using python script and a csv template</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/define-data-type-for-enterprise-gdb-feature-class/m-p/1174221#M33142</link>
      <description>&lt;P&gt;Is there a way to create a feature class from a table and limit the size of fields/define what field type they should be? I have a script that will use a csv template made from the original table to create a feature class. i would like to keep using this method (or a similar one) as the fields may not always be the same across all the tables I want to run this script on.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Brief outline of what the script does:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;export the SQL server table to csv&lt;/LI&gt;&lt;LI&gt;create an enterprise gdb&lt;/LI&gt;&lt;LI&gt;use the csv as a template to create a feature class&lt;/LI&gt;&lt;LI&gt;append the data from the csv to the feature class&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;However, this makes all text fields be &lt;STRONG&gt;nvarchar(MAX)&lt;/STRONG&gt;, in the original table they are &lt;STRONG&gt;nvarchar(50)&lt;/STRONG&gt;. I also have a datetime field that was &lt;STRONG&gt;datetime&lt;/STRONG&gt; and is now also &lt;STRONG&gt;nvarchar(MAX)&lt;/STRONG&gt;. Finally,&amp;nbsp;the lat/long fields were &lt;STRONG&gt;decimal(24,7)&lt;/STRONG&gt; but are now &lt;STRONG&gt;numeric(38,8)&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 May 2022 16:03:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/define-data-type-for-enterprise-gdb-feature-class/m-p/1174221#M33142</guid>
      <dc:creator>CaraWiebalk</dc:creator>
      <dc:date>2022-05-16T16:03:05Z</dc:date>
    </item>
  </channel>
</rss>

