From 2efe3ac3209502d9017d44320504d0437a321826 Mon Sep 17 00:00:00 2001 From: Mohamed Magdy Date: Sat, 9 Apr 2022 01:25:27 +0200 Subject: [PATCH 1/2] Filter out `None` items --- .../destination_redshift_no_dbt/destination.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/airbyte-integrations/connectors/destination-redshift-no-dbt/destination_redshift_no_dbt/destination.py b/airbyte-integrations/connectors/destination-redshift-no-dbt/destination_redshift_no_dbt/destination.py index ee1dd128e852..8252c775f54b 100644 --- a/airbyte-integrations/connectors/destination-redshift-no-dbt/destination_redshift_no_dbt/destination.py +++ b/airbyte-integrations/connectors/destination-redshift-no-dbt/destination_redshift_no_dbt/destination.py @@ -119,6 +119,8 @@ def get_records(parents: Union[DotMap, List[DotMap]], method: str) -> List[DotMa if not isinstance(parents, list): parents = [parents] + parents = list(filter(None, parents)) + children_records = [] for parent_item in parents: children = parent_item.get(method) @@ -129,7 +131,6 @@ def get_records(parents: Union[DotMap, List[DotMap]], method: str) -> List[DotMa if child_item and final_table.references and method == node[-1]: child_item[final_table.reference_key.name] = parent_item[AIRBYTE_ID_NAME] - children_records.append(child_item) return children_records From f7fedce7635cf2fd7f5cd2707bace8de670a2a6e Mon Sep 17 00:00:00 2001 From: Mohamed Magdy Date: Sat, 9 Apr 2022 01:25:58 +0200 Subject: [PATCH 2/2] Bump `Redshift No DBT` version --- .../connectors/destination-redshift-no-dbt/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/airbyte-integrations/connectors/destination-redshift-no-dbt/Dockerfile b/airbyte-integrations/connectors/destination-redshift-no-dbt/Dockerfile index 9f0670b473e5..104ca85b27e9 100644 --- a/airbyte-integrations/connectors/destination-redshift-no-dbt/Dockerfile +++ b/airbyte-integrations/connectors/destination-redshift-no-dbt/Dockerfile @@ -36,5 +36,5 @@ COPY destination_redshift_no_dbt ./destination_redshift_no_dbt ENV AIRBYTE_ENTRYPOINT "python /airbyte/integration_code/main.py" ENTRYPOINT ["python", "/airbyte/integration_code/main.py"] -LABEL io.airbyte.version=0.1.2 +LABEL io.airbyte.version=0.1.3 LABEL io.airbyte.name=airbyte/destination-redshift-no-dbt