From 9d05811307dbd37b2c8edfd60911cbf2820a392e Mon Sep 17 00:00:00 2001 From: Kyle Allan Date: Wed, 3 Jan 2018 15:13:10 -0500 Subject: [PATCH] use get function --- tap_salesforce/salesforce/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tap_salesforce/salesforce/__init__.py b/tap_salesforce/salesforce/__init__.py index dcd8da96..898da9d2 100644 --- a/tap_salesforce/salesforce/__init__.py +++ b/tap_salesforce/salesforce/__init__.py @@ -327,7 +327,7 @@ def _get_selected_properties(self, catalog_entry): or metadata.get(mdata, ('properties', k), 'inclusion') == 'automatic'] def get_start_date(self, state, catalog_entry): - replication_key = catalog_entry['replication_key'] + replication_key = catalog_entry.get('replication_key') return (singer.get_bookmark(state, catalog_entry['tap_stream_id'], @@ -338,7 +338,7 @@ def _build_query_string(self, catalog_entry, start_date, end_date=None, order_by query = "SELECT {} FROM {}".format(",".join(selected_properties), catalog_entry['stream']) - replication_key = catalog_entry['replication_key'] + replication_key = catalog_entry.get('replication_key') if replication_key: where_clause = " WHERE {} >= {} ".format(