<?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: checking for availablity of dataset based on SDE permissions in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/checking-for-availablity-of-dataset-based-on-sde/m-p/661897#M51434</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I can't think of anything simple right off the top, but there is nearly always a way to do what you want if you want to do it bad enough.&amp;nbsp; Some ideas are thrown around over in a StackExchange post:&amp;nbsp; &lt;A href="http://gis.stackexchange.com/questions/73991/checking-current-user-privileges-for-an-sde-dataset-with-python-arcpy"&gt;Checking current user privileges for an SDE dataset with Python/arcpy&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regardless of the specific approach, verifying permissions before trying to delete a dataset will be an expensive operation, or expensive enough that I might just go with a try/except block instead.&amp;nbsp; Whereas some or most languages are LBYL, Python works pretty well with EAFP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you expect the attempt to fail or succeed most of the time?&amp;nbsp; If it fails or the user doesn't have permissions, what will you do then?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 01 Jul 2015 21:20:09 GMT</pubDate>
    <dc:creator>JoshuaBixby</dc:creator>
    <dc:date>2015-07-01T21:20:09Z</dc:date>
    <item>
      <title>checking for availablity of dataset based on SDE permissions</title>
      <link>https://community.esri.com/t5/python-questions/checking-for-availablity-of-dataset-based-on-sde/m-p/661896#M51433</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am writing a python script that checks for a dataset before deleting the previous output.&amp;nbsp; I have found that arcpy.Exists returns true if a dataset exists regardless of whether the user has permissions to that dataset. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way to check that the dataset exists AND that the specific user established in the sde connection file actually has permission to that dataset in python?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Trevor&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Jul 2015 20:47:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/checking-for-availablity-of-dataset-based-on-sde/m-p/661896#M51433</guid>
      <dc:creator>TrevorWeiland</dc:creator>
      <dc:date>2015-07-01T20:47:02Z</dc:date>
    </item>
    <item>
      <title>Re: checking for availablity of dataset based on SDE permissions</title>
      <link>https://community.esri.com/t5/python-questions/checking-for-availablity-of-dataset-based-on-sde/m-p/661897#M51434</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I can't think of anything simple right off the top, but there is nearly always a way to do what you want if you want to do it bad enough.&amp;nbsp; Some ideas are thrown around over in a StackExchange post:&amp;nbsp; &lt;A href="http://gis.stackexchange.com/questions/73991/checking-current-user-privileges-for-an-sde-dataset-with-python-arcpy"&gt;Checking current user privileges for an SDE dataset with Python/arcpy&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regardless of the specific approach, verifying permissions before trying to delete a dataset will be an expensive operation, or expensive enough that I might just go with a try/except block instead.&amp;nbsp; Whereas some or most languages are LBYL, Python works pretty well with EAFP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you expect the attempt to fail or succeed most of the time?&amp;nbsp; If it fails or the user doesn't have permissions, what will you do then?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Jul 2015 21:20:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/checking-for-availablity-of-dataset-based-on-sde/m-p/661897#M51434</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2015-07-01T21:20:09Z</dc:date>
    </item>
  </channel>
</rss>

