class_docstr: Temporary object used to construct OpenLineage Dataset.
class_docstr_tok: ["Temporary","object","used","to","construct","OpenLineage","Dataset","."]
code: def to_dataset(
      self,
      namespace: str,
      database: str | None = None,
      schema: str | None = None,
  ) -> Dataset:
      # Prefix the table name with database and schema name using
      # the format: {database_name}.{table_schema}.{table_name}.
      name = ".".join(
          part
          for part in [
              self.database or database,
              self.schema or schema,
              self.table,
          ]
          if part is not None
      )
      return Dataset(
          namespace=namespace,
          name=name,
          facets={"schema": SchemaDatasetFacet(fields=self.fields)}
          if self.fields
          else {},
      )
  
file_path: airflow/airflow/providers/openlineage/utils/sql.py
imports: from __future__ import annotations
  from collections import defaultdict
  from contextlib import closing
  from enum import IntEnum
  from typing import TYPE_CHECKING, Dict, List, Optional
  from attrs import define
  from openlineage.client.facet import SchemaDatasetFacet, SchemaField
  from openlineage.client.run import Dataset
  from sqlalchemy import Column, MetaData, Table, and_, or_, union_all
label_desc: Use image node_id 1 for calling the TableSchema obj's underlying member method code with example usage: obj.to_dataset(namespace, database, schema) and returns: Dataset