class_docstr: Stores table snapshots generated by parsing YAML files.
docstr: Parse the YAML file at the given path into table snapshots.
docstr_tok: ["Parse","the","YAML","file","at","the","given","path","into","table","snapshots","."]
code: def _parse_config_yaml(file_path: Path) -> Sequence[SqlTableSnapshot]:
      """Parse the YAML file at the given path into table snapshots."""
      results = []
      with open(file_path) as f:
          file_contents = f.read()
          for config_document in yaml.load_all(
              stream=file_contents, Loader=yaml.SafeLoader
          ):
              # The config document can be None if there is nothing but white space between two `---`
              # this isn't really an issue, so lets just swallow it
              if config_document is None:
                  continue
              if not isinstance(config_document, dict):
                  raise TableSnapshotParseException(
                      f"Table snapshot YAML must be a dict. Got `{type(config_document)}`: {config_document}"
                  )
  
              keys = tuple(x for x in config_document.keys())
              if len(keys) != 1:
                  raise TableSnapshotParseException(
                      f"Table snapshot document should have one type of key, but this has {len(keys)}. "
                      f"Found keys: {keys} in {file_path}",
                  )
  
              # retrieve last top-level key as type
              document_type = next(iter(config_document.keys()))
              object_cfg = config_document[document_type]
              if (
                  document_type
                  == SqlTableSnapshotRepository.TABLE_SNAPSHOT_DOCUMENT_KEY
              ):
                  try:
                      results.append(
                          SqlTableSnapshot(
                              **object_cfg, file_path=Path(file_path)
                          )
                      )
                  except Exception as e:
                      logger.exception(
                          f"Error while parsing: {file_path}"
                      )
                      raise TableSnapshotParseException(
                          f"Error while parsing: {file_path}"
                      ) from e
              else:
                  raise TableSnapshotParseException(
                      f"Expected {SqlTableSnapshotRepository.TABLE_SNAPSHOT_DOCUMENT_KEY}, but got {document_type}"
                  )
      return results
  
imports: from __future__ import annotations
  import datetime
  import logging
  import os
  from collections import OrderedDict
  from dataclasses import dataclass
  from enum import Enum
  from pathlib import Path
  from typing import List, Optional, Sequence, Tuple, Union
  import dateutil.parser
  import pandas
  import yaml
  from dbt_semantic_interfaces.enum_extension import assert_values_exhausted
  from dbt_semantic_interfaces.implementations.base import FrozenBaseModel
  from metricflow.dataflow.sql_table import SqlTable
  from metricflow.specs.specs import hash_items
  from metricflow.test.fixtures.sql_clients.ddl_sql_client import SqlClientWithDDLMethods
label_desc: Use image node_id 2 for calling the SqlTableSnapshotRepository obj's underlying member method code with example usage: obj._parse_config_yaml(file_path) and returns: results