Skip to content

Commit

Permalink
Fix null values handling in seeds (#437)
Browse files Browse the repository at this point in the history
Co-authored-by: Noritaka Sekiyama <[email protected]>
  • Loading branch information
stephanetrou and moomindani authored Sep 13, 2024
1 parent e2f30ab commit 202032a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,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
- Fix exceptions import for FailedToConnectError and ExecutableError

## v1.8.1
Expand Down
3 changes: 2 additions & 1 deletion dbt/adapters/glue/impl.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import io
import json
import os
import re
import uuid
Expand Down Expand Up @@ -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):
Expand Down

0 comments on commit 202032a

Please sign in to comment.