From 46694586086dd5ccfb958dbe327271cc100b695f Mon Sep 17 00:00:00 2001 From: gkamiset <104546470+gkamiset@users.noreply.github.com> Date: Mon, 10 Jul 2023 15:53:21 +0530 Subject: [PATCH] Update db_sync.py added code to convert jsonb and json in source to super data type in redshift. This code is added in elif block. --- target_redshift/db_sync.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/target_redshift/db_sync.py b/target_redshift/db_sync.py index e7d2346..935b7d0 100644 --- a/target_redshift/db_sync.py +++ b/target_redshift/db_sync.py @@ -73,7 +73,13 @@ def column_type(schema_property, with_length=True): column_type = 'numeric' elif 'boolean' in property_type: column_type = 'boolean' - + #added code to convert jsonb and json to super code starts here # + elif 'jsonb' in property_type: + column_type = 'super' + elif 'json' in property_type: + column_type = 'super' + #added code to convert jsonb and json to super code end here # + # Add max length to column type if required if with_length: if column_type == 'character varying' and varchar_length > 0: