Package liquibase.analytics
Class AnalyticsBatch
java.lang.Object
liquibase.analytics.AnalyticsBatch
The batch method lets you send a series of Identify, Group, Track, Page and Screen requests in a single batch,
saving on outbound requests.
See more info here: https://segment.com/docs/connections/sources/catalog/libraries/server/http-api/#batch
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic AnalyticsBatchfromLiquibaseEvent(Event event, String userId) Converts a Liquibase-specific event into anAnalyticsBatchthat is expected by Segment.
-
Constructor Details
-
AnalyticsBatch
public AnalyticsBatch()
-
-
Method Details
-
fromLiquibaseEvent
Converts a Liquibase-specific event into anAnalyticsBatchthat is expected by Segment.This method processes the given Liquibase
Event, converts it into a format that Segment can handle, and wraps it into anAnalyticsBatch. If the event has child events, those will be recursively added to the batch. The batch is constructed using the write key from theLiquibaseRemoteAnalyticsConfiguration, if available.- Parameters:
event- the LiquibaseEventto be converted, which may contain child eventsuserId- the ID of the user associated with this event, used to identify the event's source- Returns:
- an
AnalyticsBatchobject containing the converted event and any child events - Throws:
Exception- if there is an error during event processing or configuration retrieval
-