-
Notifications
You must be signed in to change notification settings - Fork 297
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
feat: onboard klaviyo bulk upload destination #4682
base: master
Are you sure you want to change the base?
Conversation
Important Review SkippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Tip Early Access Features
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #4682 +/- ##
==========================================
- Coverage 74.60% 74.34% -0.27%
==========================================
Files 414 415 +1
Lines 48546 48798 +252
==========================================
+ Hits 36220 36280 +60
- Misses 9954 10152 +198
+ Partials 2372 2366 -6 ☔ View full report in Codecov by Sentry. |
router/batchrouter/asyncdestinationmanager/klaviyobulkupload/klaviyobulkupload.go
Outdated
Show resolved
Hide resolved
} | ||
} | ||
|
||
func (kbu *KlaviyoBulkUploader) ExtractProfiles(input map[string]interface{}) ([]map[string]interface{}, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
define struct for input type
router/batchrouter/asyncdestinationmanager/klaviyobulkupload/klaviyobulkupload.go
Show resolved
Hide resolved
Json := Body.JSON | ||
Data := Json.Data | ||
Attributes := Data.Attributes | ||
profileObject := Attributes.Profiles.Data[0] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
have check for length of Attributes.Profiles.Data so that you can avoid nil pointer
message, ok := input["message"].(map[string]interface{}) | ||
if !ok { | ||
return nil, fmt.Errorf("message field not found or not a map") | ||
func (kbu *KlaviyoBulkUploader) ExtractProfile(input Input) (Profile, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add test cases for this
Attributes struct { | ||
Profiles struct { | ||
Data []struct { | ||
Attributes struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we reuse: type ProfilesAttributes struct {
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have removed this type itself as It was redundant and causing errors
} `json:"metadata,omitempty"` | ||
} | ||
|
||
type Profile struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this needs bit of clean up, there duplicates
Description
Onboarding a new batch router bulk upload destination Klaviyo Bulk Upload
Linear Ticket
https://linear.app/rudderstack/issue/INT-1957/klaviyo-implement-bulk-upload-api
Security