<?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: Python Script to Download Data from Hosted Feature Layer in Enterprise Portal in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/python-script-to-download-data-from-hosted-feature/m-p/1202462#M65302</link>
    <description>&lt;P&gt;Hey Jeff,&lt;/P&gt;&lt;P&gt;Thanks for the reply. That is what we've tried, but have been unsuccessful so far. We get the following error:&amp;nbsp;ERROR 000732: Input Rows: Dataset ### does not exist or is not supported&lt;/P&gt;&lt;P&gt;It seems like the dataset is inaccessible in our Enterprise Portal where we use an active directory. Would you happen to have a sample script on accessing an enterprise environment?&lt;/P&gt;&lt;P&gt;Thanks again!&lt;/P&gt;</description>
    <pubDate>Fri, 12 Aug 2022 16:45:55 GMT</pubDate>
    <dc:creator>JoshSmithWCWD</dc:creator>
    <dc:date>2022-08-12T16:45:55Z</dc:date>
    <item>
      <title>Python Script to Download Data from Hosted Feature Layer in Enterprise Portal</title>
      <link>https://community.esri.com/t5/python-questions/python-script-to-download-data-from-hosted-feature/m-p/1202440#M65299</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;I have a model that I run in ArcGIS Pro that uses the table to table tool to export the data from a hosted feature layer to a csv. We'd like to get this process automated with a python script. Does anyone have one that they would be willing to share that does this or something similar?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Everything example I've found online uses ArcGIS Online and not Enterprise.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 12 Aug 2022 15:55:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-script-to-download-data-from-hosted-feature/m-p/1202440#M65299</guid>
      <dc:creator>JoshSmithWCWD</dc:creator>
      <dc:date>2022-08-12T15:55:10Z</dc:date>
    </item>
    <item>
      <title>Re: Python Script to Download Data from Hosted Feature Layer in Enterprise Portal</title>
      <link>https://community.esri.com/t5/python-questions/python-script-to-download-data-from-hosted-feature/m-p/1202451#M65300</link>
      <description>&lt;P&gt;You can export your model to a script, which will give you the best 'working' script example using your variables.&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/help/analysis/geoprocessing/modelbuilder/exporting-a-model-to-python.htm" target="_blank" rel="noopener"&gt;exporting-a-model-to-python&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Aug 2022 16:15:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-script-to-download-data-from-hosted-feature/m-p/1202451#M65300</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2022-08-12T16:15:14Z</dc:date>
    </item>
    <item>
      <title>Re: Python Script to Download Data from Hosted Feature Layer in Enterprise Portal</title>
      <link>https://community.esri.com/t5/python-questions/python-script-to-download-data-from-hosted-feature/m-p/1202462#M65302</link>
      <description>&lt;P&gt;Hey Jeff,&lt;/P&gt;&lt;P&gt;Thanks for the reply. That is what we've tried, but have been unsuccessful so far. We get the following error:&amp;nbsp;ERROR 000732: Input Rows: Dataset ### does not exist or is not supported&lt;/P&gt;&lt;P&gt;It seems like the dataset is inaccessible in our Enterprise Portal where we use an active directory. Would you happen to have a sample script on accessing an enterprise environment?&lt;/P&gt;&lt;P&gt;Thanks again!&lt;/P&gt;</description>
      <pubDate>Fri, 12 Aug 2022 16:45:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-script-to-download-data-from-hosted-feature/m-p/1202462#M65302</guid>
      <dc:creator>JoshSmithWCWD</dc:creator>
      <dc:date>2022-08-12T16:45:55Z</dc:date>
    </item>
    <item>
      <title>Re: Python Script to Download Data from Hosted Feature Layer in Enterprise Portal</title>
      <link>https://community.esri.com/t5/python-questions/python-script-to-download-data-from-hosted-feature/m-p/1202500#M65303</link>
      <description>&lt;P&gt;cool, well...&amp;nbsp; connecting to a portal can be done a few ways. with a local account:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;from arcgis.gis import GIS
portalGIS = GIS("https://your portal", 'username', "password")

dataitem = portalGIS.content.get('the id of the table that you want to get')&lt;/LI-CODE&gt;&lt;P&gt;Using oauth takes some steps to get set up,&amp;nbsp;&lt;A href="https://enterprise.arcgis.com/en/portal/latest/use/add-items.htm" target="_blank" rel="noopener"&gt;provided here&lt;/A&gt; which involves creating an Application to set up an client id.&lt;/P&gt;&lt;LI-CODE lang="python"&gt;client_id = 'you have to creat it to get it'
portalGIS = GIS(client_id=client_id, url='your portal stuff')

dataitem = portalGIS.content.get('the id of the table that you want to get')&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;... this will prompt the user to connect though, and required a generated key to be pasted last time I ran it.&amp;nbsp; If you want it hands free automated, setting up the local portal account would work easiest.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is the data shared at a level where you can get it?&lt;/P&gt;</description>
      <pubDate>Fri, 12 Aug 2022 18:06:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-script-to-download-data-from-hosted-feature/m-p/1202500#M65303</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2022-08-12T18:06:34Z</dc:date>
    </item>
  </channel>
</rss>

