Skip to content

Commit

Permalink
fix apply_catalog to make rep_key work dynamically (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
keyn4 authored Sep 24, 2024
1 parent 5ac2aec commit a4fe02d
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion tap_stripe/streams.py
Original file line number Diff line number Diff line change
Expand Up @@ -797,7 +797,16 @@ def replication_key(self):
th.Property("total_usage", th.IntegerType),
th.Property("exchange_rate", th.NumberType),
).to_dict()


def apply_catalog(self, catalog) -> None:
self._tap_input_catalog = catalog
catalog_entry = catalog.get_stream(self.name)
if catalog_entry:
self.primary_keys = catalog_entry.key_properties
if catalog_entry.replication_method:
self.forced_replication_method = catalog_entry.replication_method


class ChargesStream(stripeStream):

name = "charges"
Expand Down

0 comments on commit a4fe02d

Please sign in to comment.