<?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 Table to Domain - valid field types in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/table-to-domain-valid-field-types/m-p/562893#M18613</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;I have a SQL Server database of tables that I would like to convert to domains. The tables have an &lt;EM&gt;int&lt;/EM&gt; field that I would like to use for the &lt;EM&gt;code field&lt;/EM&gt; and a &lt;EM&gt;varchar&lt;/EM&gt; field I would like to use for the &lt;EM&gt;description field&lt;/EM&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I attempt to run the &lt;EM&gt;Table to Domain&lt;/EM&gt; geoprocessing tool, only the &lt;EM&gt;varchar&lt;/EM&gt; field appears in the dropdowns.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="452776" class="image-1 jive-image" height="183" src="https://community.esri.com/legacyfs/online/452776_pastedImage_3.png" width="359" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I try running the tool from the command line using,&lt;/P&gt;&lt;PRE class="language-python line-numbers"&gt;&lt;CODE&gt;arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;TableToDomain_management&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;r&lt;SPAN class="string token"&gt;'D:\Path to database\places.sde\CreditCardType'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"CreditCardType_id"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"TypeName"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;r&lt;SPAN class="string token"&gt;'D:\Path to fgdb\New_DB.gdb'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"CreditCardDomain"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Valid Credit Card Types"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&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;P&gt;&lt;/P&gt;&lt;P&gt;I get the following error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new, courier, monospace;"&gt;arcgisscripting.ExecuteError: Failed to execute. Parameters are not valid.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new, courier, monospace;"&gt;ERROR 000308: Invalid field type&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new, courier, monospace;"&gt;Failed to execute (TableToDomain).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The &lt;A href="https://pro.arcgis.com/en/pro-app/tool-reference/tool-errors-and-warnings/001001-010000/tool-errors-and-warnings-00301-00325-000308.htm"&gt;description &lt;/A&gt;for that error is "The field entered must be of a specific type.". The &lt;A href="http://desktop.arcgis.com/en/arcmap/10.3/tools/data-management-toolbox/table-to-domain.htm"&gt;Help &lt;/A&gt;doc for Table to Domain doesn't specify what field types are valid. I can use Table to Domain on an fgdb table with an int field. Is this specific to SQL Server?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ETA: this appears to only be an issue when a primary key restraint is applied to the &lt;EM&gt;int&lt;/EM&gt; field. Does anyone have a workaround for this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Jill&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 10 Jul 2019 18:50:55 GMT</pubDate>
    <dc:creator>JillianStanford</dc:creator>
    <dc:date>2019-07-10T18:50:55Z</dc:date>
    <item>
      <title>Table to Domain - valid field types</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/table-to-domain-valid-field-types/m-p/562893#M18613</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;I have a SQL Server database of tables that I would like to convert to domains. The tables have an &lt;EM&gt;int&lt;/EM&gt; field that I would like to use for the &lt;EM&gt;code field&lt;/EM&gt; and a &lt;EM&gt;varchar&lt;/EM&gt; field I would like to use for the &lt;EM&gt;description field&lt;/EM&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I attempt to run the &lt;EM&gt;Table to Domain&lt;/EM&gt; geoprocessing tool, only the &lt;EM&gt;varchar&lt;/EM&gt; field appears in the dropdowns.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="452776" class="image-1 jive-image" height="183" src="https://community.esri.com/legacyfs/online/452776_pastedImage_3.png" width="359" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I try running the tool from the command line using,&lt;/P&gt;&lt;PRE class="language-python line-numbers"&gt;&lt;CODE&gt;arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;TableToDomain_management&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;r&lt;SPAN class="string token"&gt;'D:\Path to database\places.sde\CreditCardType'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"CreditCardType_id"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"TypeName"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;r&lt;SPAN class="string token"&gt;'D:\Path to fgdb\New_DB.gdb'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"CreditCardDomain"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Valid Credit Card Types"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&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;P&gt;&lt;/P&gt;&lt;P&gt;I get the following error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new, courier, monospace;"&gt;arcgisscripting.ExecuteError: Failed to execute. Parameters are not valid.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new, courier, monospace;"&gt;ERROR 000308: Invalid field type&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new, courier, monospace;"&gt;Failed to execute (TableToDomain).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The &lt;A href="https://pro.arcgis.com/en/pro-app/tool-reference/tool-errors-and-warnings/001001-010000/tool-errors-and-warnings-00301-00325-000308.htm"&gt;description &lt;/A&gt;for that error is "The field entered must be of a specific type.". The &lt;A href="http://desktop.arcgis.com/en/arcmap/10.3/tools/data-management-toolbox/table-to-domain.htm"&gt;Help &lt;/A&gt;doc for Table to Domain doesn't specify what field types are valid. I can use Table to Domain on an fgdb table with an int field. Is this specific to SQL Server?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ETA: this appears to only be an issue when a primary key restraint is applied to the &lt;EM&gt;int&lt;/EM&gt; field. Does anyone have a workaround for this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Jill&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Jul 2019 18:50:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/table-to-domain-valid-field-types/m-p/562893#M18613</guid>
      <dc:creator>JillianStanford</dc:creator>
      <dc:date>2019-07-10T18:50:55Z</dc:date>
    </item>
  </channel>
</rss>

