def _populate_term_cache()

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


  def _populate_term_cache(self, response: dict[str, Any]) -> None:
    """Populates an internal cache of terms existing in the target glossary."""
    for entry in response['json'].get('entries'):
      if entry['entryType'] != 'glossary_term':
        continue
      term = bg_term.Term.from_dict(entry)
      if term:
        self._term_cache[term.display_name] = term
      else:
        logger.warning(f'Could not import term from {entry}')