aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAndy Lu <andy@stitchdata.com>2021-02-08 22:35:33 +0000
committerAndy Lu <andy@stitchdata.com>2021-02-08 22:35:33 +0000
commit790cc58f4551e0202461567df3c349693432aebf (patch)
tree4bf4e0f2abfe1045269938d34817cf234b358e52
parent6d2902807908e47d67f2fb69eda6458c2622880c (diff)
downloadtap-google-sheets-support-time-values.tar.gz
tap-google-sheets-support-time-values.tar.zst
tap-google-sheets-support-time-values.zip
Skip normal looking timessupport-time-values
-rw-r--r--tap_google_sheets/sync.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tap_google_sheets/sync.py b/tap_google_sheets/sync.py
index 986c6ca..d4db8ec 100644
--- a/tap_google_sheets/sync.py
+++ b/tap_google_sheets/sync.py
@@ -66,8 +66,8 @@ def write_bookmark(state, stream, value):
66 66
67def drop_date_on_time(schema, record): 67def drop_date_on_time(schema, record):
68 for field, field_schema in schema['properties'].items(): 68 for field, field_schema in schema['properties'].items():
69 if field_schema.get('format') == 'time': 69 if field_schema.get('format') == 'time' and 'days,' in record[field]:
70 # `time` fields come back from Google like `X days, H:M:S` 70 # `time` fields can come back from Google like `X days, H:M:S`
71 old_time = record[field] 71 old_time = record[field]
72 new_time = old_time.split(',')[1].strip() 72 new_time = old_time.split(',')[1].strip()
73 record[field] = new_time 73 record[field] = new_time