<?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 Check for Existing Graph in ArcGIS Knowledge Questions</title>
    <link>https://community.esri.com/t5/arcgis-knowledge-questions/check-for-existing-graph/m-p/1540016#M95</link>
    <description>&lt;P&gt;I’m using the arcgis Python API to build, populate, and edit a knowledge graph. I want to be able to check for the existence of a graph prior to making one. My current approach involves a try/except where I build the graph create statement and try to make one. If there’s an exception raised then I just build the url and connect.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;while this works, I wonder if there’s a more elegant solution to check for the name of that graph? Would this involve searching for all Portal graph items and then looking in that list? I suppose that would get fairly lengthy and could be expensive in itself.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;thanks for any advice.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 18 Sep 2024 16:13:04 GMT</pubDate>
    <dc:creator>DwightLanier</dc:creator>
    <dc:date>2024-09-18T16:13:04Z</dc:date>
    <item>
      <title>Check for Existing Graph</title>
      <link>https://community.esri.com/t5/arcgis-knowledge-questions/check-for-existing-graph/m-p/1540016#M95</link>
      <description>&lt;P&gt;I’m using the arcgis Python API to build, populate, and edit a knowledge graph. I want to be able to check for the existence of a graph prior to making one. My current approach involves a try/except where I build the graph create statement and try to make one. If there’s an exception raised then I just build the url and connect.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;while this works, I wonder if there’s a more elegant solution to check for the name of that graph? Would this involve searching for all Portal graph items and then looking in that list? I suppose that would get fairly lengthy and could be expensive in itself.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;thanks for any advice.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Sep 2024 16:13:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-knowledge-questions/check-for-existing-graph/m-p/1540016#M95</guid>
      <dc:creator>DwightLanier</dc:creator>
      <dc:date>2024-09-18T16:13:04Z</dc:date>
    </item>
    <item>
      <title>Re: Check for Existing Graph</title>
      <link>https://community.esri.com/t5/arcgis-knowledge-questions/check-for-existing-graph/m-p/1540360#M96</link>
      <description>&lt;P&gt;You can use gis.content.search which you can provide a query (the name of the graph you are looking for) as well as the item_type of 'Knowledge Graph'. This should return the single item if it exists. You can find more information on the parameters for search here:&amp;nbsp;&lt;A href="https://developers.arcgis.com/python/api-reference/arcgis.gis.toc.html" target="_blank"&gt;https://developers.arcgis.com/python/api-reference/arcgis.gis.toc.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Sep 2024 13:52:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-knowledge-questions/check-for-existing-graph/m-p/1540360#M96</guid>
      <dc:creator>MeganBanaski1</dc:creator>
      <dc:date>2024-09-19T13:52:52Z</dc:date>
    </item>
  </channel>
</rss>

