From 6de1d29cf9baaedcc30dc177f0dd69e8a7de8929 Mon Sep 17 00:00:00 2001 From: pgoslatara Date: Thu, 13 Oct 2022 00:23:58 +0200 Subject: [PATCH] Allowing partitions in external table to be a list (#5930) * Allowing partitions in external table to be a list * Adding changelog entry --- .changes/unreleased/Features-20220925-211651.yaml | 7 +++++++ core/dbt/contracts/graph/unparsed.py | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 .changes/unreleased/Features-20220925-211651.yaml diff --git a/.changes/unreleased/Features-20220925-211651.yaml b/.changes/unreleased/Features-20220925-211651.yaml new file mode 100644 index 00000000000..0f0f6e84213 --- /dev/null +++ b/.changes/unreleased/Features-20220925-211651.yaml @@ -0,0 +1,7 @@ +kind: Features +body: Allow partitions in external tables to be supplied as a list +time: 2022-09-25T21:16:51.051239654+02:00 +custom: + Author: pgoslatara + Issue: "5929" + PR: "5930" diff --git a/core/dbt/contracts/graph/unparsed.py b/core/dbt/contracts/graph/unparsed.py index cba62930ed0..662ec6f01ad 100644 --- a/core/dbt/contracts/graph/unparsed.py +++ b/core/dbt/contracts/graph/unparsed.py @@ -232,7 +232,7 @@ class ExternalTable(AdditionalPropertiesAllowed, Mergeable): file_format: Optional[str] = None row_format: Optional[str] = None tbl_properties: Optional[str] = None - partitions: Optional[List[ExternalPartition]] = None + partitions: Optional[Union[List[str], List[ExternalPartition]]] = None def __bool__(self): return self.location is not None