Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Update Unsupported Fields For Facebook Connector #209

Merged
merged 1 commit into from
Oct 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
from .utils import validate_end_date, validate_start_date

logger = logging.getLogger("airbyte")
UNSUPPORTED_FIELDS = {"unique_conversions", "unique_ctr", "unique_clicks"}
UNSUPPORTED_FIELDS = {"adset_start"}


class SourceFacebookMarketing(AbstractSource):
Expand Down Expand Up @@ -94,13 +94,14 @@ def check_connection(self, logger: logging.Logger, config: Mapping[str, Any]) ->
return False, f"error: {repr(e)}"
except AirbyteTracedException as traced_exc:
return False, traced_exc.message

# make sure that we have valid combination of "action_breakdowns" and "breakdowns" parameters
for stream in self.get_custom_insights_streams(api, config):
try:
try:
for stream in self.get_custom_insights_streams(api, config):
stream.check_breakdowns()
except facebook_business.exceptions.FacebookRequestError as e:
return False, e._api_error_message
except facebook_business.exceptions.FacebookRequestError as e:
return False, e._api_error_message
except AirbyteTracedException as traced_exc:
return False, traced_exc.message
return True, None

def streams(self, config: Mapping[str, Any]) -> List[Type[Stream]]:
Expand Down
Loading