From baea3df37d6b77874b6b6807662a01c6d91dd530 Mon Sep 17 00:00:00 2001 From: pgoslatara Date: Wed, 25 Sep 2024 12:03:32 +0200 Subject: [PATCH] Supporting custom granularity in time_spine --- src/dbt_bouncer/dbt_cloud/manifest_latest.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/dbt_bouncer/dbt_cloud/manifest_latest.py b/src/dbt_bouncer/dbt_cloud/manifest_latest.py index bb7a604..676006c 100644 --- a/src/dbt_bouncer/dbt_cloud/manifest_latest.py +++ b/src/dbt_bouncer/dbt_cloud/manifest_latest.py @@ -13,11 +13,20 @@ from pydantic import ConfigDict, Field, constr +class CustomGranularity(BaseParserModel): + model_config = ConfigDict( + extra='forbid', + ) + name: str + column_name: Optional[str] = None + + class TimeSpine(BaseParserModel): model_config = ConfigDict( - extra="forbid", + extra='forbid', ) standard_granularity_column: str + custom_granularities: Optional[List[CustomGranularity]] = None class Metadata(BaseParserModel):