<?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 Data source not referenced when Publishing to Federated ArcGIS Server using arcpy in ArcGIS Enterprise Questions</title>
    <link>https://community.esri.com/t5/arcgis-enterprise-questions/data-source-not-referenced-when-publishing-to/m-p/657577#M25123</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This post is related to an &lt;A _jive_internal="true" href="https://community.esri.com/thread/228280-publishing-map-to-arcgis-server-106-with-python-conundrum" target="_blank"&gt;earlier question&lt;/A&gt;. I'm spawning a new thread since this is a more specific question.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you're publishing a map service to ArcGIS Enterprise from ArcGIS Pro, you get to choose what server to publish to, e.g. your federated ArcGIS Server or a Hosting Server. You also get to select whether to "Reference Registered Data" or "Copy all data".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are no similar preferences or parameters when using (&lt;A href="https://pro.arcgis.com/en/pro-app/tool-reference/server/upload-service-definition.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;documentation&lt;/A&gt;&lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;UploadServiceDefinition_server&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;inSdFile&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; inServer&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; 
inServiceName&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;inCluster&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; inFolderType&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; inFolder&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; inStartup&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; 
inOverride&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; inMyContents&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; inPublic&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; inOrganization&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; inGroups&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;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;You just provide a server URL via &lt;SPAN style="font-family: courier new,courier,monospace;"&gt;inServer&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is also the attribute&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;sharing_draft &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; m&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;getWebLayerSharingDraft&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
sharing_draft&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;federatedServerUrl &lt;SPAN class="operator 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;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;when creating your sddraft file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've run into a conundrum where the published service shows up in my federated server REST endpoint but the underlying SDE data that&amp;nbsp;the map in PRO was referencing is not referenced by the map service, instead a GDB shows up at:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt; &lt;SPAN style="font-family: courier new,courier,monospace;"&gt;arcgisserver\directories\arcgissystem\arcgisinput\mymap.MapServer\extracted\p20&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To confirm, if I wipe out the GDB (have to stop Server), sure enough, the associated Portal item comes up blank. I haven't run into this before. All my other scripted publishing has worked like a charm.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since there is no "Reference Registered Data" option in arcpy, is this possibly default behavior when a specific datastore is not registered in ArcGIS Server Manager?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 03:50:12 GMT</pubDate>
    <dc:creator>Arne_Gelfert</dc:creator>
    <dc:date>2021-12-12T03:50:12Z</dc:date>
    <item>
      <title>Data source not referenced when Publishing to Federated ArcGIS Server using arcpy</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/data-source-not-referenced-when-publishing-to/m-p/657577#M25123</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This post is related to an &lt;A _jive_internal="true" href="https://community.esri.com/thread/228280-publishing-map-to-arcgis-server-106-with-python-conundrum" target="_blank"&gt;earlier question&lt;/A&gt;. I'm spawning a new thread since this is a more specific question.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you're publishing a map service to ArcGIS Enterprise from ArcGIS Pro, you get to choose what server to publish to, e.g. your federated ArcGIS Server or a Hosting Server. You also get to select whether to "Reference Registered Data" or "Copy all data".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are no similar preferences or parameters when using (&lt;A href="https://pro.arcgis.com/en/pro-app/tool-reference/server/upload-service-definition.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;documentation&lt;/A&gt;&lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;UploadServiceDefinition_server&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;inSdFile&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; inServer&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; 
inServiceName&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;inCluster&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; inFolderType&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; inFolder&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; inStartup&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; 
inOverride&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; inMyContents&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; inPublic&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; inOrganization&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; inGroups&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;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;You just provide a server URL via &lt;SPAN style="font-family: courier new,courier,monospace;"&gt;inServer&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is also the attribute&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;sharing_draft &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; m&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;getWebLayerSharingDraft&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
sharing_draft&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;federatedServerUrl &lt;SPAN class="operator 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;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;when creating your sddraft file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've run into a conundrum where the published service shows up in my federated server REST endpoint but the underlying SDE data that&amp;nbsp;the map in PRO was referencing is not referenced by the map service, instead a GDB shows up at:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt; &lt;SPAN style="font-family: courier new,courier,monospace;"&gt;arcgisserver\directories\arcgissystem\arcgisinput\mymap.MapServer\extracted\p20&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To confirm, if I wipe out the GDB (have to stop Server), sure enough, the associated Portal item comes up blank. I haven't run into this before. All my other scripted publishing has worked like a charm.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since there is no "Reference Registered Data" option in arcpy, is this possibly default behavior when a specific datastore is not registered in ArcGIS Server Manager?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 03:50:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/data-source-not-referenced-when-publishing-to/m-p/657577#M25123</guid>
      <dc:creator>Arne_Gelfert</dc:creator>
      <dc:date>2021-12-12T03:50:12Z</dc:date>
    </item>
    <item>
      <title>Re: Data source not referenced when Publishing to Federated ArcGIS Server using arcpy</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/data-source-not-referenced-when-publishing-to/m-p/657578#M25124</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Arne,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the data source that is being published is not registered with ArcGIS Server, ArcGIS Server would most likely copy the data to the server if the ArcGIS Server site that is being published to is not the hosting server. As you alluded to with the description of your testing, ArcGIS Server must have some kind of way to access the underlying data. During the publishing process, it will perform the check to see if the file path that is being used to publish has been registered with ArcGIS Server. If not, then it will make a copy of this data in "&lt;SPAN style="background-color: #f6f6f6;"&gt;arcgisserver\directories\arcgissystem\arcgisinput&lt;/SPAN&gt;".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know if you have any questions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Jacob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Sep 2019 12:11:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/data-source-not-referenced-when-publishing-to/m-p/657578#M25124</guid>
      <dc:creator>JacobSnyder1</dc:creator>
      <dc:date>2019-09-05T12:11:45Z</dc:date>
    </item>
  </channel>
</rss>

