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

✨Source Klaviyo: add new streams #37370

Merged
merged 4 commits into from
Apr 18, 2024
Merged

Conversation

askarpets
Copy link
Contributor

@askarpets askarpets commented Apr 17, 2024

What

Resolves https://github.com/airbytehq/product-request-backlog/issues/45

How

Added new streams with extended fields set:

  • campaigns_detailed
  • lists_detailed

Review guide

  1. manifest.yaml
  2. streams.py

User Impact

No

Can this PR be safely reverted and rolled back?

  • YES 💚
  • NO ❌

@askarpets askarpets self-assigned this Apr 17, 2024
Copy link

vercel bot commented Apr 17, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
airbyte-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 18, 2024 1:02pm

@askarpets askarpets marked this pull request as ready for review April 17, 2024 14:02
@octavia-squidington-iv octavia-squidington-iv requested review from a team April 17, 2024 14:04
Copy link
Collaborator

@lazebnyi lazebnyi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@askarpets askarpets merged commit 02f811d into master Apr 18, 2024
33 checks passed
@askarpets askarpets deleted the source-klaviyo-new-streams branch April 18, 2024 16:13
strosek pushed a commit that referenced this pull request Apr 24, 2024
yield from super().read_records(sync_mode, cursor_field, stream_slice, stream_state)
yield from self.archived_stream.read_records(sync_mode, cursor_field, stream_slice, stream_state)
) -> Iterable[Optional[Mapping[str, Any]]]:
return [{"archived": flag} for flag in (False, True)]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why does this need a custom component? why can't this be use a ListPartitionRouter?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is still needed for the CampaignsDetailed stream, which also requires additional requests to be performed in order to fetch fields which are not available in the main endpoint

if stream_slice.get("archived"):
archived_filter = "equals(archived,true)"
if "filter" in params and archived_filter not in params["filter"]:
params["filter"] = f"and({params['filter']},{archived_filter})"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suspect this can also be done with interpolation. does this need to stay in Python?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here - it is needed for the CampaignsDetailed stream

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/connectors Connector related issues area/documentation Improvements or additions to documentation connectors/source/klaviyo
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants