Skip to content

Commit

Permalink
Use union type for event_time, lookback, batch_size in config types
Browse files Browse the repository at this point in the history
  • Loading branch information
MichelleArk committed Sep 24, 2024
1 parent 165507a commit 5660d01
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions core/dbt/artifacts/resources/v1/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

from dbt import hooks
from dbt.artifacts.resources.base import Docs
from dbt.artifacts.resources.types import ModelHookType
from dbt.artifacts.resources.types import BatchSize, ModelHookType
from dbt.artifacts.utils.validation import validate_color
from dbt_common.contracts.config.base import BaseConfig, CompareBehavior, MergeBehavior
from dbt_common.contracts.config.materialization import OnConfigurationChangeOption
Expand Down Expand Up @@ -81,8 +81,8 @@ class NodeConfig(NodeAndTestConfig):
# 'mergebehavior' dictionary
materialized: str = "view"
incremental_strategy: Optional[str] = None
batch_size: Any = None
lookback: Any = 0
batch_size: Union[BatchSize, Any] = None
lookback: Union[int, Any] = 0
begin: Union[datetime, Any] = None
persist_docs: Dict[str, Any] = field(default_factory=dict)
post_hook: List[Hook] = field(
Expand Down Expand Up @@ -126,7 +126,7 @@ class NodeConfig(NodeAndTestConfig):
default_factory=ContractConfig,
metadata=MergeBehavior.Update.meta(),
)
event_time: Any = None
event_time: Union[str, Any] = None

def __post_init__(self):
# we validate that node_color has a suitable value to prevent dbt-docs from crashing
Expand Down

0 comments on commit 5660d01

Please sign in to comment.