Skip to content

Commit

Permalink
fix: primary key bug (#156)
Browse files Browse the repository at this point in the history
* fix primary key bug

* use cleaner setter override for pk

* Revert "use cleaner setter override for pk"

This reverts commit e63d6be.
  • Loading branch information
pnadolny13 authored Feb 2, 2024
1 parent b244997 commit 8278fcb
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tap_facebook/streams/ad_insights.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,15 @@ def __init__(self, *args, **kwargs) -> None: # noqa: ANN002, ANN003
def primary_keys(self) -> list[str] | None:
return ["date_start", "account_id", "ad_id"] + self._report_definition["breakdowns"]

@primary_keys.setter
def primary_keys(self, new_value: list[str] | None) -> None:
"""Set primary key(s) for the stream.
Args:
new_value: TODO
"""
self._primary_keys = new_value

@staticmethod
def _get_datatype(field: str) -> th.Type | None:
d_type = AdsInsights._field_types[field] # noqa: SLF001
Expand Down

0 comments on commit 8278fcb

Please sign in to comment.