def _populate_category_cache()

in dataplex-quickstart-labs/00-resources/scripts/python/business-glossary-import/bg_import/glossary.py [0:0]


  def _populate_category_cache(self, response: dict[str, Any]) -> None:
    """Populates an internal cache of categories existing in the target glossary."""
    for entry in response['json'].get('entries'):
      if entry['entryType'] != 'glossary_category':
        continue
      category = bg_category.Category.from_dict(entry)
      if category:
        self._category_cache[category.display_name] = category
      else:
        logger.warning(f'Could not import category from {entry}')