airflow.providers.segment.operators.segment_track_event

Module Contents

Classes

SegmentTrackEventOperator

Send Track Event to Segment for a specified user_id and event

class airflow.providers.segment.operators.segment_track_event.SegmentTrackEventOperator(*, user_id: str, event: str, properties: Optional[dict] = None, segment_conn_id: str = 'segment_default', segment_debug_mode: bool = False, **kwargs)[source]

Bases: airflow.models.BaseOperator

Send Track Event to Segment for a specified user_id and event

Parameters
  • user_id (str) -- The ID for this user in your database. (templated)

  • event (str) -- The name of the event you're tracking. (templated)

  • properties (dict) -- A dictionary of properties for the event. (templated)

  • segment_conn_id (str) -- The connection ID to use when connecting to Segment.

  • segment_debug_mode (bool) -- Determines whether Segment should run in debug mode. Defaults to False

template_fields :Sequence[str] = ['user_id', 'event', 'properties'][source]
ui_color = #ffd700[source]
execute(self, context: airflow.utils.context.Context) None[source]

This is the main method to derive when creating an operator. Context is the same dictionary used as when rendering jinja templates.

Refer to get_template_context for more context.

Was this entry helpful?