<?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: republish sde data to arcgis online hosted service in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/republish-sde-data-to-arcgis-online-hosted-service/m-p/1601523#M11285</link>
    <description>&lt;P&gt;Hi &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/417766"&gt;@Clubdebambos&lt;/a&gt;&lt;/P&gt;&lt;P&gt;II'm publishing to ArcGIS Online.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 01 Apr 2025 20:20:45 GMT</pubDate>
    <dc:creator>OfraAi</dc:creator>
    <dc:date>2025-04-01T20:20:45Z</dc:date>
    <item>
      <title>republish sde data to arcgis online hosted service</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/republish-sde-data-to-arcgis-online-hosted-service/m-p/1601258#M11281</link>
      <description>&lt;P&gt;Hi everyone&lt;/P&gt;&lt;P&gt;I have a hosted service, containing first layer + attachments, second layer with attachments and related table to the second layer with attachments for itself.&lt;/P&gt;&lt;P&gt;The original data is stored in SDE.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to publish the whole data once a month, and overwrite the whole data, using arcgis api for python.&lt;/P&gt;&lt;P&gt;No change in the layers structure.&lt;/P&gt;&lt;P&gt;I don't want to copy the data to temp FGDB before publishing, since there a lot of picture and the volume is large..&lt;/P&gt;&lt;P&gt;I could not find a solution to this scenario.&lt;/P&gt;&lt;P&gt;(by the way, using arcpy append worked in one desktop but not in the server, and argis.append does not support attachments...)&lt;/P&gt;&lt;P&gt;I'll appreciate any help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ofra&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Apr 2025 13:25:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/republish-sde-data-to-arcgis-online-hosted-service/m-p/1601258#M11281</guid>
      <dc:creator>OfraAi</dc:creator>
      <dc:date>2025-04-01T13:25:04Z</dc:date>
    </item>
    <item>
      <title>Re: republish sde data to arcgis online hosted service</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/republish-sde-data-to-arcgis-online-hosted-service/m-p/1601295#M11282</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/425303"&gt;@OfraAi&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;First question...&lt;/P&gt;&lt;P&gt;Are you publishing to ArcGIS Online or Portal?&lt;/P&gt;</description>
      <pubDate>Tue, 01 Apr 2025 15:02:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/republish-sde-data-to-arcgis-online-hosted-service/m-p/1601295#M11282</guid>
      <dc:creator>Clubdebambos</dc:creator>
      <dc:date>2025-04-01T15:02:51Z</dc:date>
    </item>
    <item>
      <title>Re: republish sde data to arcgis online hosted service</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/republish-sde-data-to-arcgis-online-hosted-service/m-p/1601523#M11285</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/417766"&gt;@Clubdebambos&lt;/a&gt;&lt;/P&gt;&lt;P&gt;II'm publishing to ArcGIS Online.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Apr 2025 20:20:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/republish-sde-data-to-arcgis-online-hosted-service/m-p/1601523#M11285</guid>
      <dc:creator>OfraAi</dc:creator>
      <dc:date>2025-04-01T20:20:45Z</dc:date>
    </item>
    <item>
      <title>Re: republish sde data to arcgis online hosted service</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/republish-sde-data-to-arcgis-online-hosted-service/m-p/1601528#M11286</link>
      <description>&lt;P&gt;Can you provide the python append that you tried to use?&lt;/P&gt;</description>
      <pubDate>Tue, 01 Apr 2025 20:24:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/republish-sde-data-to-arcgis-online-hosted-service/m-p/1601528#M11286</guid>
      <dc:creator>MikeVolz</dc:creator>
      <dc:date>2025-04-01T20:24:23Z</dc:date>
    </item>
    <item>
      <title>Re: republish sde data to arcgis online hosted service</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/republish-sde-data-to-arcgis-online-hosted-service/m-p/1601706#M11288</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/425303"&gt;@OfraAi&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;These are the two options I generally use.&lt;/P&gt;&lt;P&gt;1. No code using a referenced service. The data resides in SDE and registered with Portal through Manager Registered Data Stores. Publish the feature service to portal as a referenced service. Any edits made to the SDE feature classes are automatically applied to the service and vice versa. Add the service to AGOL using a viewer user role for AGOL users to consume (Add item in AGOL via service Portal URL). Again, any edits in Portal/SDE will automatically apply to your AGOL service.&lt;/P&gt;&lt;P&gt;2. Use this script to publish from ArcGIS Pro to AGOL. You add your layers to a Map and the service name will take on the name of your Map. Re-run every time you want to overwrite the hosted service in AGOL.&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import arcpy
import os

################################################################################
## Esri Documentation:
##  https://pro.arcgis.com/en/pro-app/latest/arcpy/mapping/arcgisproject-class.htm
##  https://pro.arcgis.com/en/pro-app/latest/arcpy/mapping/map-class.htm
##  https://pro.arcgis.com/en/pro-app/latest/arcpy/sharing/featuresharingdraft-class.htm
##  https://pro.arcgis.com/en/pro-app/latest/tool-reference/server/stage-service.htm
##  https://pro.arcgis.com/en/pro-app/latest/tool-reference/server/upload-service-definition.htm
##
##
## ArcGIS Pro Version 3.2.0
################################################################################

################################################################################
## INPUT REQUIRED  #############################################################

## the path to the APRX that contains the Map with the layers to publish
aprx_path = r""

## the name of the Map in the APRX that contains the layers to publish
map_name = "MAP NAME"

## a folder to stage the definition files
staging_fldr = r""

## some tags for our Hosted Feature Service
tags = "tag1,tag2,tag3"

## a description for our Hosted Feature Service
description = "This is our description"

## a summary for our Hosted Feature Service
summary = "This is our summary"


################################################################################
## ACCESS ARCGIS PRO COMPONENTS  ###############################################

## access the APRX
aprx = arcpy.mp.ArcGISProject(aprx_path)

## access the correct map
m = aprx.listMaps(map_name)[0]


################################################################################
## STAGING #####################################################################

## the service definition filenames and output paths
sddraft_output_filepath = os.path.join(staging_fldr, f"{map_name}.sddraft")
sd_output_filepath = os.path.join(staging_fldr, f"{map_name}.sd")

## if either of the output files already exists, then delete
if arcpy.Exists(sddraft_output_filepath):
    arcpy.Delete_management(sddraft_output_filepath)

if arcpy.Exists(sd_output_filepath):
    arcpy.Delete_management(sd_output_filepath)


################################################################################
## MANIPULATE THE SD DRAFT ######################################################

## use the Map object getWebLayerSharingDraft method
## returns a FeatureSharingDraft object
sd_draft = m.getWebLayerSharingDraft(
    server_type = "HOSTING_SERVER",
    service_type = "FEATURE",
    service_name = map_name
)

## alter some properties of the sd_draft
sd_draft.description = description
sd_draft.summary = summary
sd_draft.tags = tags
sd_draft.allowExporting = True
sd_draft.overwriteExistingService = True
#sd_draft.portalFolder = "INSERT FOLDER NAME"

## create the Service Definition Draft file
sd_draft.exportToSDDraft(sddraft_output_filepath)


################################################################################
## STAGE THE SERVICE ###########################################################

## stage the service
arcpy.server.StageService(
    in_service_definition_draft = sddraft_output_filepath,
    out_service_definition = sd_output_filepath
)


################################################################################
## PUBLISH TO ARGIS ONLINE #####################################################

## publish to agol
arcpy.server.UploadServiceDefinition(
    in_sd_file = sd_output_filepath,
    in_server = "HOSTING_SERVER"
)


################################################################################
print("\nSCRIPT COMPLETE")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Original blog post &lt;A href="https://learn.finaldraftmapping.com/publish-a-hosted-feature-service-to-arcgis-online-from-arcgis-pro-using-arcpy/" target="_blank" rel="noopener"&gt;here&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Edit: For the ArcPy approach, make sure you are signed into AGOL in Pro or use the below.&lt;/P&gt;&lt;LI-CODE lang="python"&gt;arcpy.SignInToPortal(portal_url,username,password)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please le us know if either of these suit.&lt;/P&gt;&lt;P&gt;All the best,&lt;/P&gt;&lt;P&gt;Glen&lt;/P&gt;</description>
      <pubDate>Wed, 02 Apr 2025 07:02:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/republish-sde-data-to-arcgis-online-hosted-service/m-p/1601706#M11288</guid>
      <dc:creator>Clubdebambos</dc:creator>
      <dc:date>2025-04-02T07:02:33Z</dc:date>
    </item>
    <item>
      <title>Re: republish sde data to arcgis online hosted service</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/republish-sde-data-to-arcgis-online-hosted-service/m-p/1601707#M11289</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/465276"&gt;@MikeVolz&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;By &lt;A href="https://community.esri.com/t5/arcgis-online-documents/overwrite-arcgis-online-feature-service-using/ta-p/904457/show-comments/true#:~:text=the%20Append%20operation%20is%20not%20honoring%20attachments" target="_self"&gt;this article&lt;/A&gt;, and a case I've opened, and an existing enhancement (&lt;SPAN&gt;ENH-000131471,&amp;nbsp;ENH-000173902)&lt;/SPAN&gt;, python api for arcgis append does not honor attachments.&lt;/P&gt;&lt;P&gt;Regarding using arcpy, I had problem reaching arcgis Online from different computers.&lt;/P&gt;&lt;P&gt;I have this script to check it, and any arcpy command can by used.&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;--------&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;import&lt;/SPAN&gt; &lt;SPAN&gt;arcpy&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;from&lt;/SPAN&gt; &lt;SPAN&gt;arcgis&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;gis&lt;/SPAN&gt; &lt;SPAN&gt;import&lt;/SPAN&gt; &lt;SPAN&gt;GIS&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;print&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'connecto to Online'&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;OnlineURL&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;"&lt;A href="https://atikot.maps.arcgis.com" target="_blank"&gt;https://atikot.maps.arcgis.com&lt;/A&gt;"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;username&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;'username '&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;password&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;'password'&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;gis&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;GIS&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;OnlineURL&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;username&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;password&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;print&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Connected User: '&lt;/SPAN&gt;&lt;SPAN&gt; + &lt;/SPAN&gt;&lt;SPAN&gt;gis&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;users&lt;/SPAN&gt;&lt;SPAN&gt;.me.username)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;item_id&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;'1111111111'&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;O_Feature_Service&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;gis&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;content&lt;/SPAN&gt;&lt;SPAN&gt;.get(&lt;/SPAN&gt;&lt;SPAN&gt;item_id&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;O_layer&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;O_Feature_Service&lt;/SPAN&gt;&lt;SPAN&gt;.layers[&lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;O_layer_url&lt;/SPAN&gt;&lt;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N&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;layer&lt;/SPAN&gt;&lt;SPAN&gt;)[&lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;]))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;print&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'end'&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;--------&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Good result returns the number of features using python api and arcpy.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Bad result returns the number of features using python api but when using any arcpy command I get an erro: Parameters are not valid. error 732 Dataset https:.... does not exist or is not supported. Failed to execute.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;If you have any idea why it works only on several computers and gives error on others - it would be great.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Both computers has python version 3.11.8&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Ofra&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 02 Apr 2025 07:01:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/republish-sde-data-to-arcgis-online-hosted-service/m-p/1601707#M11289</guid>
      <dc:creator>OfraAi</dc:creator>
      <dc:date>2025-04-02T07:01:38Z</dc:date>
    </item>
    <item>
      <title>Re: republish sde data to arcgis online hosted service</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/republish-sde-data-to-arcgis-online-hosted-service/m-p/1601708#M11290</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/417766"&gt;@Clubdebambos&lt;/a&gt;&amp;nbsp;Glen,&lt;/P&gt;&lt;P&gt;I'll try this script right now, although it uses arcpy to access arcgis online, and I'm not sure it will work. See my other comment to MikeVolz&lt;/P&gt;&lt;P&gt;Thank you, I'll update soon&lt;/P&gt;&lt;P&gt;Ofra&lt;/P&gt;</description>
      <pubDate>Wed, 02 Apr 2025 07:21:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/republish-sde-data-to-arcgis-online-hosted-service/m-p/1601708#M11290</guid>
      <dc:creator>OfraAi</dc:creator>
      <dc:date>2025-04-02T07:21:44Z</dc:date>
    </item>
    <item>
      <title>Re: republish sde data to arcgis online hosted service</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/republish-sde-data-to-arcgis-online-hosted-service/m-p/1601742#M11291</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/425303"&gt;@OfraAi&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Have you tried without the "token"? If they have ArcGIS Pro installed and access to ArcPy, they more than likely don't need a token.&amp;nbsp;&lt;/P&gt;&lt;P&gt;You don't need to MakeFeatureLayer to get the feature count, just access the URL directly.&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import arcpy

fl = "https://services-eu1.arcgis.com/*****/arcgis/rest/services/County Boundaries/FeatureServer/0"

## Or
# fl = O_layer.url

feature_count = arcpy.management.GetCount(fl)

print(feature_count)
&amp;gt;&amp;gt;&amp;gt; 26&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Apr 2025 09:45:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/republish-sde-data-to-arcgis-online-hosted-service/m-p/1601742#M11291</guid>
      <dc:creator>Clubdebambos</dc:creator>
      <dc:date>2025-04-02T09:45:58Z</dc:date>
    </item>
    <item>
      <title>Re: republish sde data to arcgis online hosted service</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/republish-sde-data-to-arcgis-online-hosted-service/m-p/1601851#M11292</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/417766"&gt;@Clubdebambos&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The attached script just demonstrates the problem I had using arcpy with ArcGIS Online.&lt;/P&gt;&lt;P&gt;I've found the difference between the different environment, and it seems to be the definition of temporary storage.&lt;/P&gt;&lt;P&gt;when I've added:&amp;nbsp;&lt;/P&gt;&lt;P&gt;arcpy.CreateScratchName(workspace=arcpy.env.scratchGDB)&lt;/P&gt;&lt;P&gt;it works.&lt;/P&gt;&lt;P&gt;Now I have to implement this in the whole script.&lt;/P&gt;&lt;P&gt;I'll update.&lt;/P&gt;&lt;P&gt;Thanks anyway&lt;/P&gt;&lt;P&gt;Ofra&lt;/P&gt;</description>
      <pubDate>Wed, 02 Apr 2025 14:37:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/republish-sde-data-to-arcgis-online-hosted-service/m-p/1601851#M11292</guid>
      <dc:creator>OfraAi</dc:creator>
      <dc:date>2025-04-02T14:37:12Z</dc:date>
    </item>
  </channel>
</rss>

