From 435d9eda3ef892191f4e2c7a972ec6c6cc4ef28c Mon Sep 17 00:00:00 2001 From: Daniela Angelova Date: Thu, 10 Oct 2024 13:57:13 +0300 Subject: [PATCH] Sync History tables Snowflake syncing of the history tables is failing due to unrecognised data type in the OldValue and NewValue columns. Assigning 'str' type to this fields to resolve the issue. --- tap_salesforce/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tap_salesforce/__init__.py b/tap_salesforce/__init__.py index 973eaa1..9f43ea9 100644 --- a/tap_salesforce/__init__.py +++ b/tap_salesforce/__init__.py @@ -211,6 +211,9 @@ def do_discover(sf: Salesforce, streams: list[str]): properties[field_name] = property_schema + if ((field_name=='OldValue') or (field_name=='NewValue')) and ('History' in sobject_name): + properties[field_name] = {'type': ['null', 'string']} + if replication_key: mdata = metadata.write( mdata, ('properties', replication_key), 'inclusion', 'automatic')