class_docstr: A metric data set along with the associated SQL query node that can be rendered to get those values.
docstr: Given the name of the entity, return the set of columns associated with it in the data set.
docstr_tok: ["Given","the","name","of","the","entity",",","return","the","set","of","columns","associated","with","it","in","the","data","set","."]
code: def column_associations_for_entity(
      self,
      entity_spec: EntitySpec,
  ) -> Sequence[ColumnAssociation]:
      """Given the name of the entity, return the set of columns associated with it in the data set."""
      matching_instances = 0
      column_associations_to_return = None
      for linkable_instance in self.instance_set.entity_instances:
          if (
              entity_spec.element_name
              == linkable_instance.spec.element_name
              and entity_spec.entity_links
              == linkable_instance.spec.entity_links
          ):
              column_associations_to_return = (
                  linkable_instance.associated_columns
              )
              matching_instances += 1
  
      if matching_instances > 1:
          raise RuntimeError(
              f"More than one instance with spec {entity_spec} in "
              f"instance set: {self.instance_set}"
          )
  
      if not column_associations_to_return:
          raise RuntimeError(
              f"No instances with spec {entity_spec} in instance set: {self.instance_set}"
          )
  
      return column_associations_to_return
  
file_path: metricflow/metricflow/dataset/sql_dataset.py
imports: from __future__ import annotations
  from typing import Sequence
  import more_itertools
  from metricflow.dataset.dataset import DataSet
  from metricflow.instances import InstanceSet
  from metricflow.specs.column_assoc import ColumnAssociation
  from metricflow.specs.specs import DimensionSpec, EntitySpec, TimeDimensionSpec
  from metricflow.sql.sql_plan import SqlSelectStatementNode
label_desc: Use image node_id 3 for calling the SqlDataSet obj's underlying member method code with example usage: obj.column_associations_for_entity(entity_spec) and returns: column_associations_to_return