sqlmesh.core._typing API documentation

Edit on GitHub

# sqlmesh.core._typing

View Source

     1from __future__ import annotations
     2
     3import sys
     4import typing as t
     5
     6if sys.version_info >= (3, 9):
     7    from typing import Annotated
     8else:
     9    from typing_extensions import Annotated
    10
    11from pydantic import Field
    12from sqlglot import exp
    13
    14from sqlmesh.core.notification_target import ConsoleNotificationTarget
    15from sqlmesh.integrations.github.notification_target import GithubNotificationTarget
    16
    17NotificationTarget = Annotated[
    18    t.Union[ConsoleNotificationTarget, GithubNotificationTarget],
    19    Field(discriminator="type_"),
    20]
    21
    22if t.TYPE_CHECKING:
    23    TableName = t.Union[str, exp.Table]