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(