class_docstr: Task builder for standard data warehouse validation tasks.
class_docstr_tok: ["Task","builder","for","standard","data","warehouse","validation","tasks","."]
docstr: Generates a list of tasks for validating the semantic models of the manifest.
docstr_tok: ["Generates","a","list","of","tasks","for","validating","the","semantic","models","of","the","manifest","."]
code: def gen_semantic_model_tasks(
      cls, manifest: SemanticManifest
  ) -> List[DataWarehouseValidationTask]:
      """Generates a list of tasks for validating the semantic models of the manifest."""
      tasks: List[DataWarehouseValidationTask] = []
      for semantic_model in manifest.semantic_models:
          tasks.append(
              DataWarehouseValidationTask(
                  query_and_params_callable=partial(
                      lambda name=semantic_model.node_relation.relation_name: (
                          f"SELECT * FROM {name}",
                          SqlBindParameters(),
                      )
                  ),
                  context=SemanticModelContext(
                      file_context=FileContext.from_metadata(
                          metadata=semantic_model.metadata
                      ),
                      semantic_model=SemanticModelReference(
                          semantic_model_name=semantic_model.name
                      ),
                  ),
                  error_message=f"Unable to access semantic model `{semantic_model.name}` in data warehouse",
              )
          )
  
      return tasks
  
imports: from __future__ import annotations
  import collections
  import traceback
  from dataclasses import dataclass, field
  from functools import partial
  from math import floor
  from time import perf_counter
  from typing import Callable, DefaultDict, Dict, List, Optional, Sequence, Tuple, TypeVar
  from dbt_semantic_interfaces.protocols.metric import Metric
  from dbt_semantic_interfaces.protocols.semantic_manifest import SemanticManifest
  from dbt_semantic_interfaces.protocols.semantic_model import SemanticModel
  from dbt_semantic_interfaces.references import MetricModelReference, SemanticModelElementReference, SemanticModelReference
  from dbt_semantic_interfaces.validations.validator_helpers import FileContext, MetricContext, SemanticManifestValidationResults, SemanticModelContext, SemanticModelElementContext, SemanticModelElementType, ValidationContext, ValidationError, ValidationIssue, ValidationWarning
  from metricflow.dataflow.builder.node_data_set import DataflowPlanNodeOutputDataSetResolver
  from metricflow.dataflow.builder.source_node import SourceNodeBuilder
  from metricflow.dataflow.dataflow_plan import BaseOutput, FilterElementsNode
  from metricflow.dataset.convert_semantic_model import SemanticModelToDataSetConverter
  from metricflow.dataset.dataset import DataSet
  from metricflow.engine.metricflow_engine import MetricFlowEngine, MetricFlowExplainResult, MetricFlowQueryRequest
  from metricflow.model.semantic_manifest_lookup import SemanticManifestLookup
  from metricflow.plan_conversion.column_resolver import DunderColumnAssociationResolver
  from metricflow.plan_conversion.dataflow_to_sql import DataflowToSqlQueryPlanConverter
  from metricflow.plan_conversion.time_spine import TimeSpineSource
  from metricflow.protocols.sql_client import SqlClient
  from metricflow.specs.specs import InstanceSpecSet, LinkableInstanceSpec, MeasureSpec
  from metricflow.sql.sql_bind_parameters import SqlBindParameters
label_desc: Use image node_id 4 for calling the DataWarehouseTaskBuilder obj's underlying member method code with example usage: obj.gen_semantic_model_tasks(cls, manifest) and returns: tasks