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 dimension, return the set of columns associated with it in the data set.
docstr_tok: ["Given","the","name","of","the","dimension",",","return","the","set","of","columns","associated","with","it","in","the","data","set","."]
code: def column_association_for_dimension(
      self,
      dimension_spec: DimensionSpec,
  ) -> ColumnAssociation:
      """Given the name of the dimension, return the set of columns associated with it in the data set."""
      matching_instances = 0
      column_associations_to_return = None
      for dimension_instance in self.instance_set.dimension_instances:
          if dimension_instance.spec == dimension_spec:
              column_associations_to_return = (
                  dimension_instance.associated_columns
              )
              matching_instances += 1
  
      if matching_instances > 1:
          raise RuntimeError(
              f"More than one dimension instance with spec {dimension_spec} in "
              f"instance set: {self.instance_set}"
          )
  
      if not column_associations_to_return:
          raise RuntimeError(
              f"No dimension instances with spec {dimension_spec} in instance set: {self.instance_set}"
          )
  
      return column_associations_to_return[0]
  
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 4 for calling the SqlDataSet obj's underlying member method code with example usage: obj.column_association_for_dimension(dimension_spec) and returns: column_associations_to_return