Skip to content

Commit

Permalink
List to json
Browse files Browse the repository at this point in the history
  • Loading branch information
BTheunissen committed Nov 22, 2023
1 parent 3beeb40 commit 2196af5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "shaped-target-clickhouse"
version = "0.1.19"
version = "0.1.20"
description = "`target-clickhouse` is a Singer target for clickhouse, built with the Meltano Singer SDK."
readme = "README.md"
authors = ["Ben Theunissen"]
Expand Down
2 changes: 1 addition & 1 deletion target_clickhouse/sinks.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def bulk_insert_records(
# Need to convert any records with a dict type to a JSON string.
for record in records:
for key, value in record.items():
if isinstance(value, dict):
if isinstance(value, (dict, list)):
record[key] = json.dumps(value)

return super().bulk_insert_records(full_table_name, schema, records)
Expand Down

0 comments on commit 2196af5

Please sign in to comment.