From aebfb8edec6e61622c954d7e4f431c0af04e1c83 Mon Sep 17 00:00:00 2001 From: stephanetrou <549556+stephanetrou@users.noreply.github.com> Date: Sat, 7 Sep 2024 18:48:51 +0200 Subject: [PATCH] Fix null values handling in seeds --- CHANGELOG.md | 1 + dbt/adapters/glue/impl.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9203592..9fdcbf1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ - Change GlueColumn parent from base Column to SparkColumn - Fix unraised DbtDatabaseError - Fix get_columns_in_relation function to stop returning additional partition columns +- Fix null values handling in seeds ## v1.8.1 - Fix typo in README.md diff --git a/dbt/adapters/glue/impl.py b/dbt/adapters/glue/impl.py index 4475c04..1a89e2f 100644 --- a/dbt/adapters/glue/impl.py +++ b/dbt/adapters/glue/impl.py @@ -1,4 +1,5 @@ import io +import json import os import re import uuid @@ -535,7 +536,7 @@ def create_csv_table(self, model, agate_table): code = f''' custom_glue_code_for_dbt_adapter -csv = {f.getvalue()} +csv = {json.loads(f.getvalue())} df = spark.createDataFrame(csv) table_name = '{model["schema"]}.{model["name"]}' if (spark.sql("show tables in {model["schema"]}").where("tableName == '{model["name"]}'").count() > 0):