From 43d0e9e8a50784d8ec31550ea7dbda84227155b7 Mon Sep 17 00:00:00 2001 From: Surya Gaddipati Date: Tue, 13 Jul 2021 16:47:02 -0500 Subject: [PATCH 1/2] Fix invalid timestamp format --- tap_snowflake/sync_strategies/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tap_snowflake/sync_strategies/common.py b/tap_snowflake/sync_strategies/common.py index c0ba297..2501e18 100644 --- a/tap_snowflake/sync_strategies/common.py +++ b/tap_snowflake/sync_strategies/common.py @@ -123,7 +123,7 @@ def row_to_singer_record(catalog_entry, version, row, columns, time_extracted): for idx, elem in enumerate(row): property_type = catalog_entry.schema.properties[columns[idx]].type if isinstance(elem, datetime.datetime): - row_to_persist += (elem.isoformat() + '+00:00',) + row_to_persist += (elem.isoformat(),) elif isinstance(elem, datetime.date): row_to_persist += (elem.isoformat() + 'T00:00:00+00:00',) From f7f79311dc452a7214952135b888e1e7edee15be Mon Sep 17 00:00:00 2001 From: Surya Gaddipati Date: Tue, 13 Jul 2021 17:26:48 -0500 Subject: [PATCH 2/2] Add sufix only if no tz --- tap_snowflake/sync_strategies/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tap_snowflake/sync_strategies/common.py b/tap_snowflake/sync_strategies/common.py index 2501e18..535cd6f 100644 --- a/tap_snowflake/sync_strategies/common.py +++ b/tap_snowflake/sync_strategies/common.py @@ -123,7 +123,7 @@ def row_to_singer_record(catalog_entry, version, row, columns, time_extracted): for idx, elem in enumerate(row): property_type = catalog_entry.schema.properties[columns[idx]].type if isinstance(elem, datetime.datetime): - row_to_persist += (elem.isoformat(),) + row_to_persist += (elem.isoformat() + ('' if elem.tzinfo else '+00:00'),) elif isinstance(elem, datetime.date): row_to_persist += (elem.isoformat() + 'T00:00:00+00:00',)