code: def load_kb_mappings_file(kbname, kbfile, separator):
      
      num_added = 0
      with open(kbfile) as kb_fd:
          for line in kb_fd:
              if not line.strip():
                  continue
              try:
                  key, value = line.split(separator)
              except ValueError:
                  # bad split, pass
                  current_app.logger.error("Error splitting: {0}".format(line))
                  continue
              add_kb_mapping(kbname, key, value)
              num_added += 1
      return num_added
docs: Add KB values from file to given KB returning rows added.