From d30f46bc723be4d0ec00d6ab2ae9cb25ad217af6 Mon Sep 17 00:00:00 2001 From: Steinthor Palsson Date: Sat, 14 Oct 2023 18:05:40 -0400 Subject: [PATCH] Handle none capability --- dlt/normalize/normalize.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dlt/normalize/normalize.py b/dlt/normalize/normalize.py index ee3a05499e..f115eb36ca 100644 --- a/dlt/normalize/normalize.py +++ b/dlt/normalize/normalize.py @@ -87,7 +87,8 @@ def _get_load_storage(file_format: TLoaderFileFormat) -> LoadStorage: file_format = destination_caps.preferred_loader_file_format or destination_caps.preferred_staging_file_format if storage := load_storages.get(file_format): return storage - supported_formats = list(set(destination_caps.supported_loader_file_formats) | set(destination_caps.supported_staging_file_formats)) + # TODO: capabilities.supporteed_*_formats can be None, it should have defaults + supported_formats = list(set(destination_caps.supported_loader_file_formats or []) | set(destination_caps.supported_staging_file_formats or [])) if file_format not in supported_formats: if file_format == "parquet": # Give users a helpful error message for parquet raise TerminalValueError((