From 9012ea2f5dbd45517b8162f01120ff67c8698394 Mon Sep 17 00:00:00 2001 From: Alessandro Mangone Date: Thu, 31 Mar 2022 16:39:17 +0200 Subject: [PATCH 1/2] JSON column type should be string instead of object --- tap_mysql/discover_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tap_mysql/discover_utils.py b/tap_mysql/discover_utils.py index 1cdd789..ccbdfe2 100644 --- a/tap_mysql/discover_utils.py +++ b/tap_mysql/discover_utils.py @@ -271,7 +271,7 @@ def schema_for_column(column): # pylint: disable=too-many-branches result.multipleOf = 10 ** (0 - column.numeric_scale) elif data_type in JSON_TYPES: - result.type = ['null', 'object'] + result.type = ['null', 'string'] elif data_type in STRING_TYPES: result.type = ['null', 'string'] From aab3d5e655723bcf9545a42d022ef2fe11e034a3 Mon Sep 17 00:00:00 2001 From: "Alessandro Mangone (Vektor)" <3817173+zevektor@users.noreply.github.com> Date: Fri, 1 Apr 2022 10:11:37 +0200 Subject: [PATCH 2/2] Spatial Types should be considered strings as well --- tap_mysql/discover_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tap_mysql/discover_utils.py b/tap_mysql/discover_utils.py index ccbdfe2..3d24a77 100644 --- a/tap_mysql/discover_utils.py +++ b/tap_mysql/discover_utils.py @@ -290,7 +290,7 @@ def schema_for_column(column): # pylint: disable=too-many-branches result.format = 'binary' elif data_type in SPATIAL_TYPES: - result.type = ['null', 'object'] + result.type = ['null', 'string'] result.format = 'spatial' else: