From 4e64c65e3e725382e5c3f93046afc3a147012342 Mon Sep 17 00:00:00 2001 From: Keyna Rafael <95432445+keyn4@users.noreply.github.com> Date: Wed, 1 May 2024 13:00:03 -0500 Subject: [PATCH] fix object has no attribute 'get_schema_mapping' (#3) --- tap_pipedrive/tap.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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: