diff --git a/tap_pipedrive/tap.py b/tap_pipedrive/tap.py index 30e6793..1fb8595 100644 --- a/tap_pipedrive/tap.py +++ b/tap_pipedrive/tap.py @@ -19,7 +19,7 @@ RecentNotesStream, RecentUsersStream, RecentActivitiesStream, RecentDealsStream, RecentFilesStream, RecentOrganizationsStream, RecentPersonsStream, RecentProductsStream, DealStageChangeStream, DealsProductsStream) - +from tap_pipedrive.streams.recents.dynamic_typing import DynamicTypingRecentsStream logger = singer.get_logger() @@ -268,7 +268,12 @@ def do_paginate(self, stream, stream_metadata): self.validate_response(response) self.rate_throttling(response) stream.paginate(response) - schema_mapping = stream.get_schema_mapping() + + # only dynamic type streams have get_schema_mapping() + if isinstance(stream, DynamicTypingRecentsStream): + schema_mapping = stream.get_schema_mapping() + else: + schema_mapping = stream.get_schema() # records with metrics with singer.metrics.record_counter(stream.schema) as counter: