From 6c272113ac90341975b55cfa093acc423007d973 Mon Sep 17 00:00:00 2001 From: Dave Date: Mon, 4 Mar 2024 16:03:10 +0100 Subject: [PATCH] align resource and pure data source schema with regular schema --- dlt/extract/extract.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dlt/extract/extract.py b/dlt/extract/extract.py index c1ff5da80b..338cc5b20c 100644 --- a/dlt/extract/extract.py +++ b/dlt/extract/extract.py @@ -75,8 +75,9 @@ def choose_schema() -> Schema: """Except of explicitly passed schema, use a clone that will get discarded if extraction fails""" if schema: schema_ = schema + # if we have a default schema name, use it but do not collect any info from the existing schema elif pipeline.default_schema_name: - schema_ = pipeline.schemas[pipeline.default_schema_name].clone() + schema_ = Schema(pipeline.default_schema_name) else: schema_ = pipeline._make_schema_with_default_name() return schema_